Unity Technologies BI analysts need to monitor annual revenue across Unity products such as Unity Ads, Unity Cloud, and the Unity Asset Store. Write a PostgreSQL query that joins product metadata with revenue records and calculates year-over-year performance.
NULL otherwise.product_id, product_name, revenue_year, revenue, previous_year_revenue, yoy_growth_pct.product_name ascending, then revenue_year ascending.yoy_growth_pct to exactly two decimal places.previous_year_revenue as NULL when no earlier revenue row exists.DATE '2023-01-01' and before DATE '2026-01-01'.| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique Unity product identifier |
| product_name | VARCHAR(100) | Unity product name |
| product_line | VARCHAR(50) | Product category |
| Column | Type | Description |
|---|---|---|
| revenue_idPK | INT | Unique revenue record identifier |
| product_id | INT | Referenced Unity product |
| revenue_date | DATE | Date revenue was recognized |
| net_revenue | DECIMAL(12,2) | Net revenue in USD |