SolveWithSQL

Start with Beginner SQL Challenges

Welcome to SolveWithSQL đź‘‹
If you’re new to SQL—or want to strengthen your fundamentals—you’re in the right place.

The beginner challenges are designed to help you learn SQL by solving simple, real problems, one query at a time.

No fluff. No long lectures. Just practice.

What the Beginner Challenges Are

Beginner challenges focus on the core building blocks of SQL—the things you’ll use every day when working with data.

Each challenge is:

  • Short and focused
  • Based on realistic tables and scenarios
  • Clearly scoped (you always know what to solve)
  • Followed by a clean solution and explanation

You’re encouraged to try first, even if you’re not sure. That’s how learning sticks.

What You’ll Learn

In the beginner track, you’ll practice how to:

These skills form the foundation for joins, aggregations, and more advanced queries later.

How to Use This Page

If this is your first visit, we recommend:

  1. Starting at Challenge #1
  2. Working through the challenges in order
  3. Writing the query yourself before checking the solution
  4. Moving on once the concept feels clear

There’s no timer, no scoring, and no sign-up required.

Beginner Challenge List

Start here and work your way down:

🟢 Beginner Level (Challenge 1 – 10)

  1. Challenge #1: Select Specific Columns
  2. Challenge #2: Filter Rows with WHERE
  3. Challenge #3: Sort Results with ORDER BY
  4. Challenge #4: Count Rows with COUNT()
  5. Challenge #5: Remove Duplicates with DISTINCT
  6. Challenge #6: Group and Summarize Data with GROUP BY
  7. Challenge #7: Filter Groups with HAVING
  8. Challenge #8: Join Two Tables with INNER JOIN
  9. Challenge #9: Keep All Rows with LEFT JOIN
  10. Challenge #10: Find Missing Matches with LEFT JOIN + WHERE

🟢 Beginner Level (Challenge 11 – 20)

  1. Challenge #11: Conditional Logic with CASE
  2. Challenge #12: Handling NULL Values with COALESCE
  3. Challenge #13: Filtering NULL Values with IS NULL and IS NOT NULL
  4. Challenge #14: Filter Ranges with BETWEEN
  5. Challenge #15: Pattern Matching with LIKE
  6. Challenge #16: Single-Character Matching with _ (Underscore Wildcard)
  7. Challenge #17: Combining Conditions with AND and OR
  8. Challenge #18: Sorting Results with ORDER BY
  9. Challenge #19: Limiting Results with LIMIT
  10. Challenge #20: Skipping Rows with OFFSET

🟢 Beginner Level (Challenge 21 – 30)

  1. Challenge #21: Pagination Patterns
  2. Challenge #22: Counting Rows with Conditions (COUNT + WHERE)
  3. Challenge #23: Counting Values Per Group with GROUP BY
  4. Challenge #24: Filtering Rows vs Groups (WHERE + HAVING)
  5. Challenge #25: Summing Values with SUM()
  6. Challenge #26: Calculating Averages with AVG()
  7. Challenge #27: Finding Minimum and Maximum Values (MIN / MAX)
  8. Challenge #28: Sorting Aggregated Results (ORDER BY with Aggregates)
  9. Challenge #29: Limiting Grouped Results (Top-N with Aggregates)
  10. Challenge #30: Top-N with Ties (Handling Equal Totals)

Here you’ll find Intermediate Level SQL challenges.

A Note on SQL Dialects

The examples in SolveWithSQL use standard SQL wherever possible.
The concepts apply to popular systems such as:

  • PostgreSQL
  • MySQL
  • SQLite
  • SQL Server

Minor syntax differences may exist, but the core ideas remain the same.

Ready to Start?

Begin with the first challenge and start writing queries.

👉 Start with Beginner Challenge #1

Write queries. Make mistakes. Learn SQL by doing.