Aggregation & GROUP BY SQL interview questions
Almost every analytics interview starts here: grouping rows, choosing the right grain and filtering on aggregates with HAVING. These problems also test ratio-of-sums versus average-of-ratios and NULL handling.
- Revenue by Product CategoryfreeAggregation & GROUP BY · Joinseasy
- Monthly Revenue TrendfreeDates & Time · Aggregation & GROUP BYeasy
- Average Order Value by CountryfreeAggregation & GROUP BY · Subqueries & CTEseasy
- Completed Trips and Gross Fares by CityfreeAggregation & GROUP BYeasy
- Fare per Kilometer by Vehicle TypeJoins · Aggregation & GROUP BYeasy
- Trip Requests by Hour of DayDates & Time · Aggregation & GROUP BYeasy
- Drivers with Low RatingsAggregation & GROUP BY · Joinseasy
- Repeat Rider-Driver PairsAggregation & GROUP BYeasy
- Signups by Acquisition ChannelfreeAggregation & GROUP BYeasy
- Daily Active Users in MarchDates & Time · Aggregation & GROUP BYeasy
- Power Users in MarchAggregation & GROUP BY · Dates & Timeeasy
- Current MRR by PlanAggregation & GROUP BY · Dates & Timeeasy
- Accounts with More Than 5 UsersAggregation & GROUP BY · Joinseasy
- Account Activity SummaryJoins · Aggregation & GROUP BYeasy
- Click-Through Rate by ChannelfreeAggregation & GROUP BY · Joinseasy
- Cost per Click by CampaignAggregation & GROUP BY · Joinseasy
- Days with Impressions but No ClicksAggregation & GROUP BY · Joinseasy
- Unique Clickers per DayDates & Time · Aggregation & GROUP BYeasy
- Reconcile Daily Clicks with Click LogsJoins · Aggregation & GROUP BYeasy
- Repeat Purchase RateSubqueries & CTEs · Aggregation & GROUP BYmedium
- Referral LeaderboardSelf-Joins · Aggregation & GROUP BYmedium
- Outcome of Riders' First RequestWindow Functions · Aggregation & GROUP BYmedium
- Weekly Active RidersDates & Time · Aggregation & GROUP BYmedium
- Each Campaign's Share of Channel SpendWindow Functions · Aggregation & GROUP BYmedium
- Users Who Clicked Ads on Every ChannelJoins · Aggregation & GROUP BYmedium
- Frequently Bought TogetherSelf-Joins · Aggregation & GROUP BYhard
- Customers Who Bought in Every Quarter of 2025Subqueries & CTEs · Dates & Timehard
- Hours with Above-Average PricingSubqueries & CTEs · Dates & Timehard
- Median Fare by CityWindow Functions · Aggregation & GROUP BYhard