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:
- Select specific columns from a table
- Filter rows using
WHERE - Sort results with
ORDER BY - Count rows and values
- Remove duplicates with
DISTINCT - Use basic conditions and comparisons
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:
- Starting at Challenge #1
- Working through the challenges in order
- Writing the query yourself before checking the solution
- 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: Select Specific Columns
- Challenge #2: Filter Rows with
WHERE - Challenge #3: Sort Results with
ORDER BY - Challenge #4: Count Rows with
COUNT() - Challenge #5: Remove Duplicates with
DISTINCT - Challenge #6: Group and Summarize Data with GROUP BY
- Challenge #7: Filter Groups with HAVING
- Challenge #8: Join Two Tables with INNER JOIN
- Challenge #9: Keep All Rows with LEFT JOIN
- Challenge #10: Find Missing Matches with LEFT JOIN + WHERE
- Challenge #11: Conditional Logic with CASE
- Challenge #12: Handling NULL Values with COALESCE
- Challenge #13: Filtering NULL Values with IS NULL and IS NOT NULL
- Challenge #14: Filter Ranges with BETWEEN
- Challenge #15: Pattern Matching with LIKE
- Challenge #16: Single-Character Matching with _ (Underscore Wildcard)
- Challenge #17: Combining Conditions with AND and OR
(More beginner challenges will be added over time.)
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.