Your question is Regional Rental Revenue Summary. 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.
Write a PostgreSQL query that joins Hertz rental transactions to Hertz location data and summarizes completed rental revenue by region. Keep transactions with missing location matches by grouping them under Unknown, and include a count of those unmatched transactions in the output.
| Column | Type | Description |
|---|---|---|
| transaction_id | ||
| reservation_code | ||
| pickup_location_id | ||
| rental_date | ||
| status | ||
| revenue_amount |
| Column | Type | Description |
|---|---|---|
| location_id | ||
| location_name | ||
| region |