Moscow Clients with Total Credit Limits Above 20000
The finance team wants to find clients with large combined credit limits across their cards. For clients in the Moscow region, add up the credit_limit values for all their cards.
Practice SQL JOIN with problems that go beyond matching two tables. Work with customers, orders, employees, and other related data to find records, combine information, and calculate results. Your queries run in a real database and are automatically checked against expected results using hidden data. Problems in this set: 148, free: 26.
Problems in this set: 148, free: 26
Start with a free problemProblems found: 86
Reset filtersThe finance team wants to find clients with large combined credit limits across their cards. For clients in the Moscow region, add up the credit_limit values for all their cards.
An analyst wants to measure the percentage of users who confirmed their signup.
Spotify wants to find the artists whose songs appeared in the global chart's top 10 on the most distinct days.
An e-commerce platform identifies its most active customers by the number of distinct products they have purchased.
The academic affairs team wants to identify students whose share of assignments completed with full marks exceeds 50%.
The finance department identifies high-spending clients based on their total card transaction amounts. Find clients whose total transaction amount exceeds 9200. Return client_name and total_spent.
The regional analytics team wants the highest account balance in every region where clients hold accounts. Exclude regions where no clients have accounts.
The onboarding team is looking for clients who have not opened any accounts. Return the name of each client who has no records in the accounts table.
An educational platform wants to find courses that users started but did not complete. Find user-course pairs where completed = false and completion_date IS NULL. Return the user's name and course_id.
A "supercustomer" is someone who has purchased at least one product from every category. Find all such customers and return customer_id and name.
An airline is ranking pilots by the total number of passengers they have carried. For each pilot, calculate the total number of passengers (total_passengers) across all of their flights.
An airline plans to recognize its three leading pilots. For each pilot, add up the number of passengers across all their flights, then select the three pilots with the highest totals.
When one customer has several orders, joining the tables produces several rows for that customer. This can inflate counts and sums. Check whether the join keys are unique on either side, and compare the number of rows before and after the JOIN.
A LEFT JOIN fills columns from the missing right-hand record with NULL. Filtering those columns in WHERE can remove the unmatched rows you intended to keep. Check whether records without matches are still present, and decide whether the condition belongs in ON or WHERE.
Two columns with similar names are not necessarily related. Joining them can produce no matches or, worse, convincing but incorrect pairs of records. Check what each key represents, whether the data types are compatible, and whether a few known relationships appear correctly in the result.
INNER JOIN returns only matching records. If the problem asks for customers without orders or pages without likes, those rows will disappear. Before writing the query, decide whether unmatched records belong in the output. Test your choice using records that have no corresponding row.
Yes. Free problems in this set: 26. You can solve them without paying. After signing in, the free plan allows up to 3 new problems per day. Premium problems are visible in the list but require a subscription to solve.
Reference solutions are not published. You write your own SQL, which runs against a real database. The trainer automatically checks the result against an expected result using hidden data. Problems include hints and an AI mentor to help you work through the logic.
Think about which rows must appear in the result. Use LEFT JOIN when every row from the left table should remain, even without a matching record on the right. INNER JOIN is appropriate when you only need matches. The difference becomes clear when you test missing relationships.
The relationship may be one-to-many or many-to-many. A single row from one table can match several rows in another, producing multiple output rows. That is not always a mistake. First decide whether the problem expects every matching pair or one result per entity.
Not always. Some problems only require connecting tables and selecting the right records. Others ask you to count related rows, calculate totals, or summarize the joined data. Start with straightforward joins, then move to problems that combine JOIN with aggregation.