Top 50
Topic roadmap
Updated weekly · Last refresh Nov 3

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
67companies covered
Track your progressSign up free to work through all 50 questions and resume where you left off.
Start practicing free →
1
SQL & Data ManipulationStart here. 49 questions · ~985 min
Second Highest in MySQLMedium
Practice
Recently asked

Use DENSE_RANK and a CTE to find every Capgemini Engineering employee earning the second highest distinct salary.

mysqlsql queriesCapgemini EngineeringHsbcIon Group
Second Highest Value in SQLEasy
Practice

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

aggregationsql queriesIQVIASmartsheetEnova International
Second Maximum Salary QueryEasy
Practice
Recently asked

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

sql queriesHashedInNewgen SoftwareSagitec Solutions
SQL And Spark QueryingMedium
Practice

Find all employees tied for the maximum salary using a PostgreSQL CTE and explain equivalent DataFrame and RDD transformations.

Data Analysissql queriesKpi PartnersJpmorgan Chase &Exusia
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
SQL: Active User QueryMedium
Practice
Recently asked

Find the most active Palantir Foundry user with a date-filtered LEFT JOIN and aggregation.

Data Analysissql queriesPalantir technologiesPalantir
Finding Second-Highest ValuesMedium
Practice
Recently asked

Find the second-highest distinct non-NULL salary using PostgreSQL window-function logic.

Window FunctionsSubqueriesnull handlingAAccenture EspañaEErnst & Young U.S. LLPLLSEG (London Stock Exchange Group)
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 TechnologiesBalyasny Asset ManagementIntuitive Surgical
More SQL & Data Manipulation 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
2
More topics1 question · ~20 min
More questions with a free account
The finish line: interview-readyComplete all 50 questions to finish this plan.