SQL Joins Practice Problems: 440 Questions with Solutions

440 SQL joins practice problems with solutions: INNER, LEFT and self joins, anti joins and multi-table joins. Written in MySQL, judged on hidden datasets.

  • Problems: 440
  • By difficulty: 121 easy · 190 medium · 129 hard
  • Dialect: MySQL

Practise SQL joins in MySQL: INNER, LEFT and RIGHT joins, self joins, anti joins with LEFT JOIN … IS NULL, and joins across three or more tables. The wrong join type loses or duplicates rows — a customer with no orders, an employee with no manager — which is what these problems are built around. Joins are the most common SQL interview topic, and most later topics assume them.

Easy SQL joins problems

Medium SQL joins problems

Hard SQL joins problems

Every SQL problem · The SQL skill test