πŸͺ

Essential cookies keep authentication working. With your permission, we also use analytics to improve the product. Privacy Policy

DDataEngPrep.tech
Home
PricingBlog
Sign InStart Free→

Interview Questions

Real questions from top companies in SQL

700+ Easy450+ Medium650+ Hard
All CategoriesBehavioralSpark/Big DataSQLPython/CodingSystem Design/ArchitectureCloud/ToolsGeneral/Othereasymediumhard
1

Write an SQL query to find the second-highest salary from an employee table.

SQLmediumpartitionsqlwindow0.8 min read
AccentureBCGCognizantIncedo+2
β†’
2

Demonstrate the difference between DENSE_RANK() and RANK()

SQLmediumpartitionwindow0.5 min read
CapcoImpetusKPMGWipro
β†’
3

Discuss differences between ROW_NUMBER(), RANK(), and DENSE_RANK(), and provide examples from your projects.

SQLmediumwindow0.5 min read
AareteAccentureFossil GroupYash Technologies
β†’
4

Explain the differences between Data Warehouse, Data Lake, and Delta Lake

SQLmediumbigquerypartitionsnowflake2 min read
FractalKPMGMatrixMeesho
β†’
5

Explain the differences between Repartition and Coalesce. When would you use each?

SQLmediumjoinpartition0.5 min read
DatameticaFedEx DataworksNihilentPresidio+1
β†’
6

Explain the differences between a Data Lake and a Data Warehouse.

SQLeasylakehousesnowflakesql2 min read
ChryselysFedEx DataworksLumiqNAB
β†’
7

What is the difference between partitioning and bucketing in Spark, and when would you use bucketing?

SQLmediumjoinpartitionspark2 min read
CitiCoforgeHCLLTIMindtree+1
β†’
8

Can you explain the difference between OLTP and OLAP?

SQLmediumbigquerysnowflakesql2 min read
AccentureCognizantEPAMYash Technologies
β†’
9

Describe a time when you had to optimize a slow SQL query. What steps did you take?

SQLmediumjoinsql0.5 min read
AareteAccentureFossil GroupYash Technologies
β†’
10

Explain the concept of ACID properties in the context of databases.

SQLeasy2 min read
AccentureCognizantEPAMYash Technologies+1
β†’
11

Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

SQLmediumjoin2 min read
AccentureCognizantEPAMYash Technologies
β†’
12

How do you handle NULL values in SQL? Mention functions like COALESCE and NULLIF.

SQLmediumjoinsql1 min read
AccentureCognizantEPAMYash Technologies
β†’
13

What is a Common Table Expression (CTE), and when would you use it?

SQLhardbigqueryoptimizationsnowflake2 min read
AccentureCognizantEPAMYash Technologies
β†’
14

What is the difference between a primary key and a unique key?

SQLhardsparksql2 min read
AccentureCognizantEPAMYash Technologies
β†’
15

What is the difference between WHERE and HAVING clauses in SQL?

SQLmediumsql2 min read
AccentureCognizantEPAMYash Technologies
β†’
16

Describe a scenario where partitioning and bucketing would improve query performance.

SQLmediumjoinpartition0.7 min read
Daniel WellingtonGoldman SachsSwiggyMeta
β†’
17

Explain Fact and Dimension Tables with examples.

SQLhardjoin0.6 min read
DatameticaDeloitteIncedo
β†’
18

Explain the types of triggers in ADF, including schedule, tumbling window, and event-based triggers.

SQLmediumpartitionwindow0.5 min read
FedEx DataworksNihilentVirtusa
β†’
19

How do you remove duplicate rows in BigQuery?

SQLmediumbigquerypartition0.6 min read
EYIncedoTech Mahindra
β†’
20

Joins and window functions - INNER, LEFT, RIGHT, FULL OUTER, ROW_NUMBER(), RANK(), DENSE_RANK()

SQLhardjoinpartitionwindow0.7 min read
FordKPMGNihilent
β†’

Reading isn't practice. Get AI feedback on your answers.

Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.

Try AI Answer Coach β€” FreeStart a Mock Interview
123...10Next
Topic Hubs
All Topic Hubs (12 Competencies) β†’All 1,863+ QuestionsSQL Interview QuestionsApache Spark QuestionsPySpark QuestionsPython for Data EngineersSystem Design InterviewData Modeling & WarehousingStreaming (Kafka/Flink)SQL Window FunctionsETL Pipeline Design
Company Hubs
All Company Hubs (100+ Companies) β†’AmazonGoogleMetaDatabricksSnowflakeNetflixUberStripeMicrosoftAppleGoldman SachsAWS Engineering
Academies & Guides
All Guides & ArticlesData Engineering AcademyForward Deployed AI AcademyClient Simulation StudioApache Airflow QuestionsAzure Data EngineerBehavioral & STAR MethodCloud & Distributed Tools
AI Tools & Products
Answer Analyzer (Free)AI Mock InterviewsSQL PlaygroundATS Resume AnalyzerOffline PDF Answer VaultsMembership & Pricing
Company
About & Editorial PolicyContact UsAI DisclosureDisclaimerTerms of ServicePrivacy Policy
Β© 2026 DataEngPrep.tech. All rights reserved.
AboutBlogContactDisclaimer