What is your experience with SQL window functions?
Using the provided regions and yield_observations tables, demonstrate that experience by calculating each region's average yield for 2024 and its rank within its country. Include regions without a valid 2024 yield.
country, region_name, average_yield, and country_rank.| Column | Type | Description |
|---|---|---|
| region_idPK | INT | Unique region identifier |
| country | VARCHAR(80) | Country containing the region |
| region_name | VARCHAR(120) | Name of the agricultural region |
| Column | Type | Description |
|---|---|---|
| observation_idPK | INT | Unique observation identifier |
| region_id | INT | Referenced region |
| observation_date | DATE | Date of the yield observation |
| yield_tonnes | DECIMAL(10,2) | Observed yield in tonnes |