Find Customers with High-Priced Ticket Purchases
The marketing team wants to identify customers who frequently buy premium event tickets, so they can target them with exclusive offers.
Your task is to find all customers who have made at least one purchase where the ticket price was higher than the average price across all purchases.
To do this, you’ll use a subquery inside the WHERE clause — a common SQL technique for comparing individual records to aggregated values.
Task
From the event_ticketing.sqlite database, display:
name(from thecustomerstable)
Only include customers who have purchased at least one ticket with a price above the average across all purchases.
How to solve it
Write a SQL query that joins the customers and purchases tables.
Use a subquery inside the WHERE clause to calculate the average ticket price, and return only customers with purchases above that value.
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help
Code Editor
Tables
Execution Result