Write a SQL query to find the total revenue generated by each marketing channel over the last 30 days. Use the provided marketing channel and order data. Include channels with no qualifying orders and treat their revenue as zero.
channel_name and total_revenuetotal_revenue descending, then channel_name ascending| Column | Type | Description |
|---|---|---|
| channel_idPK | INT | Unique identifier for the marketing channel |
| channel_name | VARCHAR(100) | Marketing channel name |
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| channel_id | INT | Marketing channel attributed to the order |
| order_date | DATE | Date the order was placed |
| revenue | NUMERIC(12,2) | Revenue attributed to the order |