Average Age of Smartwatch Buyers in 2024
Alfa-Bank is analyzing customer purchases at partner stores. The marketing team wants to understand the demographics of smartwatch buyers so it can offer them gadget insurance.
Prepare for SQL interviews by solving problems collected from real interviews at 77 companies, including Amazon, Microsoft, Meta, and others. Each problem identifies its company and covers practical SQL skills, from basic filtering to joins and aggregation. Your query runs in a real database and is automatically checked using hidden data. Problems: 172, free: 44.
Problems in this set: 172, free: 44
Start with a free problemProblems found: 161
Reset filtersAlfa-Bank is analyzing customer purchases at partner stores. The marketing team wants to understand the demographics of smartwatch buyers so it can offer them gadget insurance.
Lenta.ru tracks daily activity on its video platform: how many views videos receive in total and how many unique users watch them each day.
At MTS, a product analyst compiles a weekly ranking of customers by spending over the past month for triggered marketing campaigns and upsell offers. Today is 2026-05-05.
Samokat is analyzing its network of dark stores for 15-minute delivery. An operations analyst wants to identify cities where the network has reached a strategically significant scale.
The finance department is preparing an overview of client account balances. For each client, calculate the sum of the balances across all their accounts and return the client's name and total_balance.
Tochka Bank's CRM helps managers find customers who still have unexpired product applications.
Cian uses a practice library schema to prepare for real-world tasks involving property listings. This exercise tests your ability to join tables, group rows, and filter groups.
The quality team is calculating the average driver rating across the service. Find the average rating, round it to 2 decimal places, and return the result in a column named avg_rating.
Management wants to map the cities where the company has properties. Return a list of distinct cities with at least one property. Sort the result alphabetically.
Skypro's finance team is closing out the last full calendar month and wants revenue totals for each course. The current date is fixed at 2024-04-15, so the last full month is March 2024.
The gamification team is selecting high-scoring game sessions. Find games where score > 100. Return name and score. Sort the result by score in descending order.
Facebook wants to identify pages that have never received a like. Return the IDs of these pages in a column named page_id.
Interview problems often ask for counts of users, orders, or actions. Those are different units. When one user generates several events, counting rows can inflate the answer. Before writing SQL, define what one counted item represents and whether repeated records should contribute.
Several users, products, or categories may share the same score. Sorting with LIMIT does not always produce the ranking logic the problem expects. Check whether the requested result is a fixed number of rows or includes all records tied at a particular rank.
Phrases such as during a day, last month, and after a date describe different intervals. A query may work on ordinary records but fail at the boundaries. Check whether start and end values are inclusive and whether the column contains dates or timestamps.
Joining tables can duplicate an order, payment, or user before aggregation. The final numbers may look reasonable even when they are incorrect. Identify the level of detail in each table and verify that the JOIN does not multiply the entity you intend to count or sum.
Yes. Total problems in this collection: 172, free: 44. After signing in, you can solve up to 3 new problems per day on the free plan. Premium problems remain visible in the list but require a subscription to solve.
Reference SQL solutions are not published. You write and submit your own query, which runs in a real database. The trainer automatically compares its output with an expected result using hidden data. Problems include hints and an AI mentor to help with your approach.
Every problem in this collection is associated with a company where it appeared in an interview. The collection covers 77 companies. The name provides context for the question, but solving it still comes down to understanding the tables, the business requirement, and the expected output.
Not entirely. This collection includes different kinds of SQL problems, including selections, joins, aggregations, and more involved data analysis. Rather than memorizing individual query patterns, practice identifying which operations a question requires and checking whether the result is logically correct.
First define what one output row represents: a user, order, product, or event. Then review filters, joins, duplicates, missing values, and date boundaries. For ranking problems, consider ties. These checks can reveal logical mistakes even when the SQL executes without syntax errors.