Write a SQL query to calculate daily concession revenue, ticket sales, and average transaction value by theater location at Regal.
Use completed transactions only. Treat ticket sales as the total amount from ticket transactions, and average transaction value as the average amount across completed transactions.
location, transaction_date, concession_revenue, ticket_sales, and average_transaction_value.location ascending and transaction_date ascending.| Column | Type | Description |
|---|---|---|
| theater_idPK | INT | Unique Regal theater identifier |
| location | VARCHAR(100) | Theater location name |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| theater_id | INT | Theater associated with the transaction |
| transaction_at | TIMESTAMP | Timestamp when the transaction occurred |
| transaction_type | VARCHAR(20) | Transaction category, either ticket or concession |
| amount | DECIMAL(10,2) | Transaction amount |
| status | VARCHAR(20) | Transaction processing status |