SQL that finally makes sense

Go from zero to querying real databases.

Twenty short, practical lessons take you from your very first SELECT to joins, subqueries, and window functions — learning by doing, not by wading through theory.

Works in SQL Server, MySQL & PostgreSQL 2nd Edition · 20 lessons
From Zero to SQL in 20 Lessons — book cover Free scripts inside

Why this book

Stuck at the blank query window?

Staring at a database and not sure where to start? Or you just want a plain-English reference you can actually follow? From Zero to SQL breaks the language into 20 short, practical lessons that take you from your very first SELECT to joins, subqueries, and window functions. Every example is tested and ready to run, so you learn by doing — not by wading through theory.

Learn how to

Skills you'll walk away with

Works with the database you already use. Every example runs in Microsoft SQL Server, MySQL, and PostgreSQL, with free, ready-to-run setup and practice scripts for each.

See all 20 lessons →

Start practicing in minutes

Get the LearnSQL practice database — free

The same sample database used throughout the book: owners, dogs, cats, and vet visits. Paste one script into a free browser sandbox and start running queries. Setup and practice scripts included for all three databases.

Browse the free scripts →

Join the SQL Trail

Learning sticks when you do it with others

Grab the free scripts, get extra practice, and share your progress. Have a question, or want another database covered? Reach out — I read every message.

Share your progress with #ZeroToSQL

About the author

Carlos L Chacon Jr

Written by Carlos L Chacon Jr

I've spent my career working with databases — and I wrote this book to give beginners the friendly, hands-on start I wish I'd had. When I'm not writing about SQL, I run Kovoco, helping teams get more out of their data.