Real questions from top companies in SQL
Explain the use of Elastic Resize vs. Classic Resize in Redshift.
Explain the use of surrogate keys vs. natural keys in data modeling.
Explain types of joins in Spark with examples.
Explain your approach to optimizing a slow-running query on a table with billions of rows.
Explain your understanding of indexing, partitioning, and execution plans.
Fact vs Dimension Table - categorize data
Facts and Dimension Tables Properties
Features of NoSQL Databases
Filter Rows Where Employee Salary > Manager Salary
Find 3rd Highest Salary
Find Employees with Maximum Salary in Each Department
Find average salary by department, max average salary, and list of employees for the max salary department.
Find average salary for each manager β Assume a table with manager_id and employee_salary
Find each student's previous year's scores using the LAG function.
Find employees who earn the third-highest salary.
Find non-common records in two tables (SQL EXCEPT or NOT IN)
Find the 2nd highest salary for each department using the DENSE_RANK() function.
Find the error in the provided SQL query.
Find the second-highest salary in the employees table using three different methods.
Find the third-highest salary for each department.
Type or paste your answer to any of these questions and our AI Coach scores it, highlights gaps, and rewrites it at FAANG quality. Free to try.