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.
Lessons in this chapter · Solve real-world problems with SQL.
- 1. Filter Bookings by Region
- 2. Sort and Limit Recent Reservations
- 3. Use Logical AND/OR to Filter Hotel Data
- 4. Count Transactions by Customer
- 5. Calculate Average Spending per Client
- 6. Filter Customers with High Transaction Totals
- 7. Join Flights with Passengers
- 8. List Passengers with No Reservations
- 9. Find Customers with High-Priced Ticket Purchases
- 10. Filter Events with Above-Average Ticket Sales
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help