KEMBAR78
Advance SQL Questions | PDF
0% found this document useful (0 votes)
9 views6 pages

Advance SQL Questions

This document contains a list of advanced SQL interview questions aimed at entry-level roles, covering topics such as window functions, subqueries, and data manipulation techniques. Key questions include differences between various SQL functions, handling of NULLs, and concepts like normalization and indexing. The document serves as a resource for candidates preparing for SQL interviews.

Uploaded by

vishubhupendra9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

Advance SQL Questions

This document contains a list of advanced SQL interview questions aimed at entry-level roles, covering topics such as window functions, subqueries, and data manipulation techniques. Key questions include differences between various SQL functions, handling of NULLs, and concepts like normalization and indexing. The document serves as a resource for candidates preparing for SQL interviews.

Uploaded by

vishubhupendra9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ADVANCED

Advanced
SQL
Interview
Questions
for Entry-
Level Roles
Pradeep M
@pradeepanalyst
1

1. What is the difference between RANK(),


DENSE_RANK(), and ROW_NUMBER()?

2. How do you identify and delete duplicate


rows from a table?

3. Explain how a WITH clause (CTE) works and


when to use it.

4. How would you find the second highest


salary in a table?

5. What are window functions? Give an


example.

6. How can you pivot and unpivot data in


SQL?

7. How do you handle NULLs in SQL joins and


conditions?
2

8. What is a correlated subquery and how is it


different from a regular subquery?

9. How would you optimize a slow-running


SQL query?

10. What is the use of EXISTS vs IN? When


would you choose one over the other?

11. Explain the concept of indexing and how


it affects query performance.

12. What is the difference between UNION


and UNION ALL?

13. How do you calculate running totals using


SQL?

14. Write a query to find the Nth highest


salary from an employee table.
3

15. What is normalization? Explain different


normal forms.

16. What is a common table expression (CTE),


and can it be recursive?

17. How do you identify missing values or


gaps in a sequence of dates or IDs?

18. How would you write a SQL query to


transpose rows into columns?

19. What is the difference between DELETE,


TRUNCATE, and DROP?

20. Explain ACID properties in the context of


SQL transactions.

21. How do you use CASE statements in SQL


queries?
4

22. What’s the difference between a primary


key and a unique key?

23. How do window functions differ from


aggregate functions?

24. Write a query to get the top 3 employees


by salary in each department.

25. How would you find consecutive dates or


repeating patterns in data?

26. What are the differences between


VARCHAR, CHAR, and TEXT data types?

27. What is the purpose of the MERGE


statement? Provide a use case.

28. How can you find anomalies or outliers


using SQL?
I hope you find this
valuable!
A like from you would be a great
encouragement

Pradeep M
@pradeepanalyst

You might also like