What is the sequence of execution in SQL?
Explain the logical processing order and write a PostgreSQL query that demonstrates the sequence using the provided tables. The query should include filtering, aggregation, a minimum group condition, ranking, sorting, and limiting.
department_name, passed_runs, and run_rank.| Column | Type | Description |
|---|---|---|
| department_idPK | INT | Unique department identifier |
| department_name | VARCHAR(100) | Department name |
| Column | Type | Description |
|---|---|---|
| run_idPK | INT | Unique test run identifier |
| department_id | INT | Department associated with the run |
| run_date | DATE | Date the test run completed |
| status | VARCHAR(20) | Test run result status |