Can you write SQL queries to retrieve specific data from a database and validate the results?
Use the validation_results table. Retrieve failed validations with at least one recorded defect. Exclude rows with a missing defect count and return the results in reverse execution order.
validation_id, test_name, executed_on, and defect_countdefect_count greater than zeroexecuted_on descending, then validation_id ascending| Column | Type | Description |
|---|---|---|
| validation_idPK | INT | Unique validation result identifier |
| test_name | VARCHAR(100) | Name of the validation test |
| result_status | VARCHAR(20) | Validation outcome |
| severity | VARCHAR(20) | Severity assigned to the validation result |
| executed_on | DATE | Date when the validation ran |
| defect_count | INT | Number of defects identified by the validation |