Write a SQL query to join these three tables and calculate the year-over-year growth for this metric at Brown University.
Use the supplied Brown University tables and include annual observations with a prior-year comparison when available.
metric_name, reporting_year, metric_value, prior_year_value, and yoy_growth_pctmetric_name, then reporting_year ascending| Column | Type | Description |
|---|---|---|
| metric_idPK | INT | Unique metric identifier |
| metric_name | VARCHAR(100) | Display name of the Brown University metric |
| metric_description | VARCHAR(255) | Optional description of the metric |
| Column | Type | Description |
|---|---|---|
| period_idPK | INT | Unique reporting period identifier |
| reporting_year | INT | Calendar year represented by the period |
| period_type | VARCHAR(20) | Period classification, such as Annual or Term |
| Column | Type | Description |
|---|---|---|
| metric_value_idPK | INT | Unique metric observation identifier |
| metric_id | INT | References metric_definitions.metric_id |
| period_id | INT | References reporting_periods.period_id |
| metric_value | NUMERIC(12,2) | Observed value for the metric and period |