Write a SQL query to compare revenue growth across product lines.
Use the provided product line and monthly revenue tables. Calculate month-over-month growth for each product line where a prior month is available.
product_line_name, revenue_month, current_revenue, prior_revenue, and growth_percentagegrowth_percentage descending, placing NULL values last, then by product_line_name ascending| Column | Type | Description |
|---|---|---|
| product_line_idPK | INT | Unique product line identifier |
| product_line_name | VARCHAR(100) | Product line display name |
| Column | Type | Description |
|---|---|---|
| revenue_idPK | INT | Unique revenue record identifier |
| product_line_id | INT | Referenced product line identifier |
| revenue_month | DATE | First day of the revenue month |
| revenue_amount | DECIMAL(14,2) | Revenue amount for the record |