Your question is Count Specific Names in SQL. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Transaction Network Services wants a quick validation query for employee records assigned to active operational units. Write a PostgreSQL query that counts employees whose exact first_name value is Jack and whose department is active.
employees to departments using department_id.Jack, preserving PostgreSQL's case-sensitive comparison.is_active is TRUE.jack_count.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| first_name | VARCHAR(100) | Employee's first name |
| department_id | INT | Assigned department identifier |
| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(150) | TNS department name |
| is_active | BOOLEAN | Whether the department is currently active |