Top 50
Topic roadmap
Updated weekly · Last refresh Sep 12

Top 50 sql Interview Questions

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

50questions
~17htotal time
333companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
Window FunctionsStart here. 14 questions · ~280 min
SQL Window Functions Moving AverageMedium
Practice
Recently asked

Calculate a three-day moving average of active-client revenue using aggregation and SQL window functions.

Window FunctionsData AnalysissqlAAreteSShyena Tech YarnsAATB Financial
SQL Window Functions Rolling AverageMedium
Practice
Recently asked

Calculate three-day rolling average sales by region using aggregation, joins, and PostgreSQL window functions.

Window FunctionssqlAAreteSSweetwaterKohl's
Running Average With Window FunctionsEasy
Practice
Recently asked

Calculate each Hinge user's 30-day rolling average of daily interactions using CTEs and window functions.

Window FunctionsData AnalysissqlHingeAAlight SolutionsTTikTok USDS JV
Rolling Average with SQL Window FunctionsMedium
Practice

Use a PostgreSQL window function to calculate inclusive 30-day rolling sensor averages for active WSP monitoring assets.

Window FunctionssqlWWSPSenseNNaval Nuclear Laboratory
More Window Functions questions with a free account
2
sql13 questions · ~260 min
SQL Duplicate RecordsEasy
Practice
Recently asked

Identify repeated UST QA test executions using a CTE, GROUP BY, HAVING, and a project join.

sqlUSTKpmg UsAllstate
Month-Over-Month Retention QueryHard
Practice
Recently asked

Calculate next-month checking account retention for Chase customers with an online deposit during their first seven days.

sqlSpokeoJPMorganChaseNextdoor
More sql questions with a free account
3
aggregation6 questions · ~120 min
More aggregation questions with a free account
4
Joins5 questions · ~100 min
More Joins questions with a free account
5
More topics12 questions · ~240 min
SQL Query OptimizationMedium
Practice
Recently asked

Optimize a slow PostgreSQL query that aggregates completed transactions while preserving customers with no matching activity.

Performance Tuningdatabase optimizationindexesDDroisysCapgeminiNomura
Second and Nth Highest ValuesMedium
Practice
Recently asked

Find the second highest distinct salary and adapt the query to retrieve any requested salary rank.

Data Manipulationsqldatabase queryingSnowflake ComputingKKGISLAARi
More questions with a free account

Sign up to see every question

Create a free account to unlock this list and practice real interview questions.

Get my prep plan
The finish line: interview-readyComplete all 50 questions to finish this plan.