PetBox wants a report of currently active subscriptions and the revenue tied to each subscribed product. Write a SQL query to return one row per active subscription.
revenuestatus = 'active'subscriptions to customers and products using their keys| Column | Type | Description |
|---|---|---|
| customer_idPK | INT | Unique identifier for each customer |
| name | VARCHAR(255) | Customer's full name |
| VARCHAR(255) | Customer email address | |
| created_at | TIMESTAMP | Timestamp when the customer account was created |
| Column | Type | Description |
|---|---|---|
| product_idPK | INT | Unique identifier for each product |
| name | VARCHAR(255) | Product name |
| category | VARCHAR(255) | Product category |
| price | DECIMAL(10,2) | Product price |
| Column | Type | Description |
|---|---|---|
| subscription_idPK | INT | Unique identifier for each subscription |
| customer_id | INT | Reference to the customer |
| product_id | INT | Reference to the product |
| start_date | DATE | Date the subscription started |
| next_shipment_date | DATE | Date of the next scheduled shipment |
| status | VARCHAR(255) | Current subscription status |