Explain OOP concepts and common SQL commands you would use to query and manipulate data.
Use PostgreSQL syntax and demonstrate the explanation with the supplied departments and employees tables. Return a department-level summary that includes departments without employees.
department_name, total_employees, active_employees, avg_active_salary, and staffing_status.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| employee_idPK | INT | Unique employee identifier |
| employee_name | VARCHAR(100) | Employee name |
| department_id | INT | Referenced department identifier |
| status | VARCHAR(20) | Employee status |
| salary | NUMERIC(12,2) | Annual salary |