Top 50 sql Interview Questions
The most frequently asked sql questions across all roles and companies, ranked by real interview frequency. Updated daily.
Calculate a three-day moving average of active-client revenue using aggregation and SQL window functions.
AAreteSShyena Tech YarnsAATB FinancialCalculate three-day rolling average sales by region using aggregation, joins, and PostgreSQL window functions.
AAreteSSweetwater
Kohl'sCalculate each Hinge user's 30-day rolling average of daily interactions using CTEs and window functions.
HingeAAlight SolutionsTTikTok USDS JVUse a PostgreSQL window function to calculate inclusive 30-day rolling sensor averages for active WSP monitoring assets.
SenseNNaval Nuclear LaboratoryIdentify repeated UST QA test executions using a CTE, GROUP BY, HAVING, and a project join.
UST
Kpmg Us
AllstateCalculate next-month checking account retention for Chase customers with an online deposit during their first seven days.
Spokeo
JPMorganChase
NextdoorOptimize a slow PostgreSQL query that aggregates completed transactions while preserving customers with no matching activity.
Capgemini
NomuraFind the second highest distinct salary and adapt the query to retrieve any requested salary rank.
Snowflake ComputingKKGISLAARiSign up to see every question
Create a free account to unlock this list and practice real interview questions.