Solve a SQL join question along with a 1-star pattern coding question.
For the SQL portion, write a query that summarizes completed assignments for every active employee, including employees with no completed assignments.
employee_id, employee_name, completed_assignments, and total_completed_hours.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| is_active | BOOLEAN | Whether the employee is currently active |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique assignment identifier |
| employee_id | INT | Employee assigned to the work item |
| status | VARCHAR(30) | Assignment status |
| hours | NUMERIC(8,2) | Hours recorded for the assignment |
| assignment_date | DATE | Date the assignment was created |