Skills101
← All practice quizzes

Quiz: SQL Interview Queries

5 questionsNo time limitPass: 60%+10 XP on first pass

The SQL questions asked again and again: Nth highest salary, duplicates, employees above department average, no-match rows, manager hierarchy, counts per group and more.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Which query finds duplicate emails in a users table?

  2. Question 2

    After departments LEFT JOIN employees, which gives 0 (not 1) for a department with no employees?

  3. Question 3

    Salaries are 90, 80, 80, 70. What is the second highest DISTINCT salary?

  4. Question 4

    Why write 100.0 * SUM(x) / total instead of 100 * SUM(x) / total?

  5. Question 5

    "Highest salary in each department with the employee name" — what must you mention?