Find the second highest salary from the Employee table. If there is no second highest salary, return NULL.
JobPrepAI > SQL Practice
Sharpen your database querying skills with real-world technical interview challenges. Solve questions covering joins, window functions, CTEs, and aggregations with instant evaluation.
Find the second highest salary from the Employee table. If there is no second highest salary, return NULL.
Write a SQL query to find employees who have the highest salary in each department.
Find employees who are high earners, defined as earning one of the top three unique salaries in their department.
Write a SQL query to report all the duplicate emails in the Person table.
Find all customers who never placed any orders.
Find all numbers that appear at least three times consecutively in the Logs table.
Write a SQL query to find employees who earn more than their direct managers.
Report the first name, last name, city, and state of each person in the Person table.