Top 10 SQL Interview Questions and Answers

Here is the list of top 10 most frequently asked SQL Interview Questions.

The solution and explanations for all these questions are provided in the following video tutorials.

So lets get started.


Q1 - How to delete duplicates from a table?


Q2 - How to find nth highest salary?


Q3 - How to find employee manager hierarchy? Self Join


Q4 - How to find list of names starting/ending with 'A'? / Pattern Matching scenarios




Q5 - How to convert data from rows to columns?

                                                              USING CASE




USING PIVOT




Q6 - What are the different types of Joins in SQL?



Q7 - What is the difference between Rank, Row Number and Dense Rank functions?



Q8 - How to compare current quarter's sale with previous quarter's sale?



Q9 - How to calculate YTD and MTD totals?




Q10 - What is the difference between Count(*), Count(1) and Count(colname) ?





Post a Comment

Previous Post Next Post

Contact Form