Dates & Time SQL interview questions
Date handling differs between engines. These problems use SQLite's strftime, date() modifiers and julianday(), and each explanation notes the Postgres or BigQuery equivalent.
- Monthly Revenue TrendfreeDates & Time · Aggregation & GROUP BYeasy
- Trip Requests by Hour of DayDates & Time · Aggregation & 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
- Unique Clickers per DayDates & Time · Aggregation & GROUP BYeasy
- Quarterly Cancellation RateConditional Aggregation · Dates & Timemedium
- Days from Signup to First OrderDates & Time · Subqueries & CTEsmedium
- Running Revenue Total for 2025Running Totals & Rolling Windows · Window Functionsmedium
- Month-over-Month Revenue GrowthWindow Functions · Dates & Timemedium
- Time Between First and Second OrderWindow Functions · Dates & Timemedium
- Weekly Active RidersDates & Time · Aggregation & GROUP BYmedium
- Riders Active in January but Not MarchSubqueries & CTEs · Dates & Timemedium
- 7-Day Activation Rate by ChannelFunnels & Activation · Joinsmedium
- DAU/MAU Stickiness for MarchDates & Time · Subqueries & CTEsmedium
- Hours from Signup to First ProjectDates & Time · Subqueries & CTEsmedium
- Churned Accounts and Lost MRRWindow Functions · Dates & Timemedium
- Team to Business UpgradesSelf-Joins · Dates & Timemedium
- Paying Accounts with No Recent ActivitySubqueries & CTEs · Dates & Timemedium
- Week-over-Week Spend by ChannelWindow Functions · Dates & Timemedium
- Hours from First Click to PurchaseDates & Time · Subqueries & CTEsmedium
- 90-Day Repeat Rate by First-Order CohortRetention & Cohorts · Subqueries & CTEshard
- Customers Who Bought in Every Quarter of 2025Subqueries & CTEs · Dates & Timehard
- Riders with 3-Day Ride StreaksGaps & Islands · Window Functionshard
- Average Idle Time Between TripsWindow Functions · Dates & Timehard
- Hours with Above-Average PricingSubqueries & CTEs · Dates & Timehard
- New vs Returning Riders by MonthRetention & Cohorts · Subqueries & CTEshard
- Weekly Signup Cohort RetentionRetention & Cohorts · Dates & Timehard
- Sessionize Events with a 30-Minute GapWindow Functions · Gaps & Islandshard
- First-Touch Attribution with a 14-Day LookbackMarketing Attribution · Window Functionshard