What is a view in SQL? How do you create a view?
Asked in the Technical interview stage. Write PostgreSQL SQL that creates a reusable employee assignment summary view.
employee_id, employee_name, office, active_assignment_count, and active_billable_hours.Active in the count and hours.employee_id ascending.| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee full name |
| office | VARCHAR(50) | Employee office location |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique assignment identifier |
| employee_id | INT | Assigned employee identifier |
| assignment_name | VARCHAR(120) | Assignment name |
| status | VARCHAR(20) | Assignment status |
| billable_hours | DECIMAL(8,2) | Billable hours recorded for the assignment |