Write SQL queries to retrieve the top 50 rows and the minimum two values from a specific column
Asked in the Technical stage. Use the provided case tables and treat priority_score as the specific column.
result_type, case_id, case_title, priority_score, created_at, and category_name.created_at descending and case_id descending for ties, followed by the two smallest distinct non-null priority_score values in ascending order.| Column | Type | Description |
|---|---|---|
| case_idPK | INT | Unique case identifier |
| case_title | VARCHAR(150) | Case title |
| category_id | INT | Referenced case category |
| priority_score | INT | Case priority score |
| created_at | DATE | Case creation date |
| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Unique category identifier |
| category_name | VARCHAR(80) | Category name |