DataEngPrep.tech
QuestionsBlogStore
Get PDF Bundle

Interview Questions

Real questions from top companies in SQL

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

When would you choose a Snowflake schema over a Star schema?

SQLmediumjoinsnowflake0.6 min read
Goldman SachsMicrosoftZS Associates
→
22

Detail examples of inner, outer, left, and right joins.

SQLmediumjoin0.7 min read
ImpetusTech Mahindra
→
23

Difference Between Internal and External Tables in BigQuery

SQLhardbigqueryoptimizationpartition0.6 min read
EYIncedoTech Mahindra
→
24

Difference between ROW_NUMBER(), RANK(), and DENSE_RANK() with examples.

SQLmediumpartition0.6 min read
PresidioSwiggy
→
25

Difference between where and having clause with examples.

SQLmedium0.6 min read
PresidioSwiggy
→
26

Explain Common Table Expressions (CTEs) and their benefits.

SQLeasybigquery0.5 min read
AareteDunnhumbyIncedo
→
27

Explain SQL Window Functions with examples.

SQLmediumjoinpartitionsql0.5 min read
AareteDunnhumbyIncedo
→
28

Explain the difference between UNION and UNION ALL.

SQLeasy0.4 min read
PresidioSwiggy
→
29

Explain the use of the MERGE statement in SQL.

SQLmediumbigqueryjoinpartition0.5 min read
AareteDunnhumbyIncedo
→
30

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

SQLmediumjoinsql0.5 min read
AareteDunnhumbyIncedo
→
31

How do you optimize a long-running SQL query?

SQLhardjoinoptimizationpartition0.6 min read
AareteDunnhumbyIncedo
→
32

How would you handle duplicate records in an SQL table?

SQLmediumpartitionsql0.6 min read
AareteDunnhumbyIncedo
→
33

Implement a query to find the top 5 customers by total sales amount.

SQLmediumpartitionwindow0.5 min read
Daniel WellingtonGoldman SachsSwiggy
→
34

SQL query to find the second highest salary from each department.

SQLmediumpartitionsqlwindow0.4 min read
AccentureYash Technologies
→
35

What are primary keys and foreign keys? Why are they important?

SQLmediumjoin0.4 min read
PresidioSwiggy
→
36

What is a self-join, and when would you use it?

SQLmediumjoin0.4 min read
PresidioSwiggy
→
37

What is normalization and denormalization? When would you use each?

SQLmediumetljoin0.4 min read
PresidioSwiggy
→
38

What is the difference between a clustered and non-clustered index?

SQLeasybigquerysql0.4 min read
PresidioSwiggy
→
39

What is the difference between a view and a materialized view?

SQLmedium0.4 min read
PresidioSwiggy
→
40

What is the difference between DELETE and TRUNCATE?

SQLeasy0.4 min read
PresidioSwiggy
→
Previous1234...25Next