Your question is SQL Join With Matching and Non-Matching. Start with the requirements and the two tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
OneTrust QA engineers need to reconcile test cases defined for the OneTrust Privacy Management platform with their recorded test executions. Write a PostgreSQL query that returns matching and non-matching records from both sources.
FULL OUTER JOIN on test_case_id so unmatched rows from either table are retained.match_status column containing Matched, Missing Execution, or Unregistered Execution using CASE.| Column | Type | Description |
|---|---|---|
| test_case_idPK | INT | Unique test case identifier |
| test_case_name | VARCHAR(150) | Name of the OneTrust QA test case |
| priority | VARCHAR(20) | Test case priority |
| Column | Type | Description |
|---|---|---|
| execution_idPK | INT | Unique execution identifier |
| test_case_id | INT | Referenced test case identifier |
| execution_status | VARCHAR(20) | Execution result status |
| executed_at | TIMESTAMP | Time the test was executed |