Write a SQL query to find the month-over-month growth rate of active listings in San Francisco.
Use the provided listing and monthly status data. Return each month represented in the data, including the earliest month even though it has no prior-month comparison.
month, active_listings, and mom_growth_rate.active_listings is the number of distinct active San Francisco listings. mom_growth_rate should be expressed as a percentage rounded to two decimal places, with NULL for the first month.| Column | Type | Description |
|---|---|---|
| listing_idPK | INT | Unique listing identifier |
| city | VARCHAR(100) | City where the listing is located |
| property_type | VARCHAR(50) | Type of property |
| Column | Type | Description |
|---|---|---|
| snapshot_idPK | INT | Unique status snapshot identifier |
| listing_id | INT | Listing associated with the status snapshot |
| snapshot_date | DATE | Date of the listing status snapshot |
| is_active | BOOLEAN | Whether the listing was active on the snapshot date |