Apex Systems QA engineers review automated test execution history across product modules. Write a PostgreSQL query that reports the most recent passing test for every module, including modules that have no passing test.
modules, even when it has no test run or no passing test.test_runs.status = 'PASS'.executed_at. If multiple passing runs have the same timestamp, choose the row with the greatest test_run_id.| Column | Type | Description |
|---|---|---|
| module_idPK | INTEGER | Unique identifier for a product module |
| module_name | VARCHAR(100) | Human-readable module name |
| Column | Type | Description |
|---|---|---|
| test_run_idPK | INTEGER | Unique identifier for a test execution |
| module_id | INTEGER | Module tested by the run |
| status | VARCHAR(20) | Test outcome |
| executed_at | TIMESTAMP | Completion timestamp of the test run |