6 views
24 Jan 2026
Tables: Orders(order_id, customer_id, total_amount, created_at). Return customer_id and total spend, sorted by spend desc....
8 views
24 Jan 2026
Table: Employees(emp_id, name, manager_id). Find employees who have no manager....
5 views
24 Jan 2026
Table: Employees(emp_id, salary). Return the second highest distinct salary. If it does not exist, return NULL....
9 views
24 Jan 2026
Table: Logins(user_id, login_time). Return date and number of distinct users per date....
6 views
24 Jan 2026
Tables: Orders(order_id, customer_id), Customers(customer_id). List orders whose customer_id does not exist in Customers....
5 views
24 Jan 2026
Tables: Products(product_id, name), OrderItems(order_id, product_id). Find products that never appear in OrderItems....
5 views
24 Jan 2026
Table: Employees(emp_id, salary). Write a query pattern to get the Nth highest distinct salary (assume N is given)....
8 views
24 Jan 2026
Table: Logins(user_id, day). day is a date. Find users who logged in on 3 consecutive days....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
5 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
5 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
5 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
8 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
6 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
11 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
4 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
4 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....
4 views
24 Jan 2026
Table: Sales(store_id, amount). Return store_id and average amount, only stores with at least 5 rows....
5 views
24 Jan 2026
Table: Scores(user_id, score, created_at). Return each row with the rank of score within the same day....
6 views
24 Jan 2026
Tables: A(id, val), B(id, val). Return ids present in both tables....