DataEngPrep.tech
QuestionsBlogStore
Get PDF Bundle

Interview Questions

Real questions from top companies in SQL · medium

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

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

SQLmediumjoinsql0.5 min read
AareteDunnhumbyIncedo
→
22

How would you handle duplicate records in an SQL table?

SQLmediumpartitionsql0.6 min read
AareteDunnhumbyIncedo
→
23

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

SQLmediumpartitionwindow0.5 min read
Daniel WellingtonGoldman SachsSwiggy
→
24

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

SQLmediumpartitionsqlwindow0.4 min read
AccentureYash Technologies
→
25

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

SQLmediumjoin0.4 min read
PresidioSwiggy
→
26

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

SQLmediumjoin0.4 min read
PresidioSwiggy
→
27

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

SQLmediumetljoin0.4 min read
PresidioSwiggy
→
28

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

SQLmedium0.4 min read
PresidioSwiggy
→
29

Write an SQL query to find duplicate emails in a users table.

SQLmediumpartitionsqlwindow0.5 min read
Daniel WellingtonGoldman SachsSwiggy
→
30

Triggers in ADF, especially tumbling window triggers.

SQLmediumpartitionwindow0.5 min read
AccentureYash Technologies
→
31

What is a window function? Explain with an example.

SQLmediumjoinpartitionwindow0.5 min read
CitiFreecharge
→
12

What is the difference between OLTP and OLAP?

SQLmedium
13

Write a SQL query to find top 3 earners in each department.

SQLmedium
14

Write a query to find the top three highest-paid employees in each department using window functions.

SQLmedium
15

Write complex SQL queries involving multiple joins, subqueries, and data aggregation logic.

SQLmedium
16

Add Row Numbers using window function in PySpark

SQLmedium
17

Add a column to the Employees table that shows the name of the employee with the next higher employee_id.

SQLmedium
18

Add a new column with manager names for each employee using a self-join.

SQLmedium
19

Add a new column with the average salary by department.

SQLmedium

+9 More Questions with Expert Answers

Get the complete 1,800+ question library with detailed, expert-level answers covering SQL, Spark, System Design, Python, Cloud, and Behavioral topics.

Get PDF Bundle — from $21Try Free Sample
Previous1234...14Next