Your Cart
Loading

SQL Joins & GROUP BY Practice Pack - Free Sample

On Sale
$0.00
Free Download
Added to cart

Most SQL practice tells you whether your query runs. This sample shows you whether it's right and how an instructor would grade it.


You get 5 problems from the full SQL Joins & GROUP BY Practice Pack, written by Dr. John Conklin, a college database instructor. Every problem uses the same small university database, campus.sql, which is included. That way, you can run your answer and compare your output row by row.


What's inside

  • Problem 1: Who's taking what? (INNER JOIN, Easy)
  • Problem 6: Students with no classes (LEFT JOIN and NULLs, Easy)
  • Problem 12: Count per course (GROUP BY, Easy)
  • Problem 18: WHERE or HAVING? (Medium)
  • Problem 22: Who mentors whom? (Self-join, Medium)


Every solution includes

  • The answer query: with the exact output it returns from the dataset.
  • The steps: in the order you'd work them on an exam.
  • The common wrong answer: the query students hand in most often, and why it loses points, even when it runs without an error.
  • A 10-point rubric: so you can score your own work honestly.


The dataset: 6 tables and 56 rows, with deliberate edge cases. There's a course that's never been offered, a section with no instructor, two students with the same name, and a student enrolled in nothing. That's where most exam points are lost.


How to use it: load campus.sql in SQLite (free and included with Python) or PostgreSQL. Try each problem first, then turn the page and grade yourself. Your total out of 50 tells you which topics to review.


Good for: students in an intro database or SQL course, anyone preparing for a SQL exam or technical interview, and self-taught analysts who want to check their join and grouping skills.


Files: PDF, 24 pages, US Letter, plus campus.sql. Every query was tested in SQLite 3.39 or later and PostgreSQL 18.

Want all 25 problems?


Tags / keywords

SQL, SQL joins, GROUP BY, LEFT JOIN, SQL practice problems, SQLite, PostgreSQL, SQL exam prep, database course, SQL interview prep

You will get the following files:
  • SQL (4KB)
  • PDF (106KB)