Your question is Top 10 IDs Query. 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.
First American Financial uses title order records and property data to support title and settlement workflows. An operations dashboard needs the highest order IDs from currently valid, completed orders.
Write a PostgreSQL query that returns the top 10 title_order_id values in descending order. Include only completed title orders linked to active properties.
title_orders to properties using property_id.title_order_id, sorted descending, with at most 10 rows.| Column | Type | Description |
|---|---|---|
| title_order_idPK | INT | Unique title order identifier |
| property_id | INT | Related property identifier |
| order_status | VARCHAR(20) | Current title order status |
| Column | Type | Description |
|---|---|---|
| property_idPK | INT | Unique property identifier |
| property_name | VARCHAR(100) | Property label |
| is_active | BOOLEAN | Whether the property is active |