Top 50
Topic roadmap
Updated weekly · Last refresh Sep 12

Top 50 sql queries Interview Questions

The most frequently asked sql queries questions across all roles and companies, ranked by real interview frequency. Updated daily.

50questions
~17htotal time
60companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
aggregationStart here. 3 questions · ~60 min
Second Highest Value in SQLEasy
Practice
Recently asked

Find the second highest distinct CRP value from completed trials using a join and DENSE_RANK window function.

aggregationsql queriesIQVIASmartsheetEnova International
SQL Join and Grouping QueryMedium
Practice
Recently asked

Use LEFT JOINs and COUNT DISTINCT to count games with under 10 hours of playtime for each console.

aggregationsql queriesXeroNatera
More aggregation questions with a free account
2
sql queries20 questions · ~400 min
Second Maximum Salary QueryEasy
Practice

Use DENSE_RANK and a LEFT JOIN to find active HashedIn employees earning the second-highest distinct salary.

sql queriesHashedInHashedIn by DeloitteNewgen Software
SQL Top Products QueryMedium
Practice

Rank completed Cloud Software Group product revenue within each category using aggregation and a window function.

sql queriesAggregationsCloud Software GroupRich ProductsObserve.AI
Compute Session Durations and GapsHard
Practice

Use window functions to calculate session length and flag user session gaps over 30 minutes.

sql queriesAdobeAttentive
SQL Bookstore Schema PracticeEasy
Practice
Recently asked

Use a CTE, joins, and distinct aggregates to calculate Meta Logistics bookstore payment metrics.

sql queriessqlpythonMeta Logistics
More sql queries questions with a free account
3
Joins9 questions · ~180 min
SQL Joins and Year-Over-Year GrowthMedium
Practice

Join Unity product and revenue data to calculate annual revenue and year-over-year growth with LAG.

Joinssql queriesUnity TechnologiesIntuitive SurgicalBalyasny Asset Management
More Joins questions with a free account
4
Data Analysis6 questions · ~120 min
More Data Analysis questions with a free account
5
Date Functions3 questions · ~60 min
More Date Functions questions with a free account
6
Window Functions3 questions · ~60 min
More Window Functions questions with a free account
7
More topics6 questions · ~120 min
The finish line: interview-readyComplete all 50 questions to finish this plan.