Sign Up Free
SQL Fundamentals

Interview Questions

  1. What is the difference between WHERE and HAVING?
  2. Explain INNER JOIN vs LEFT JOIN vs RIGHT JOIN.
  3. What is the difference between GROUP BY and DISTINCT?
  4. What is a subquery? When would you use one?
  5. What is a CTE and why would you use it?
  6. What are window functions? Explain ROW_NUMBER(), RANK(), and DENSE_RANK().
  7. What is the difference between UNION and UNION ALL?
  8. How would you find duplicate records?
  9. How would you find the second-highest salary?
  10. How would you optimize a query containing multiple JOINs?
Next TopicQuery Lifecycle