Everything you might wonder about LearnSQL. Still stuck? The documentation goes deeper.
LearnSQL is a free, hands-on sandbox for learning SQL and REST APIs. It exposes a collection of classic sample databases through a simple read-only API, an in-browser query playground, and direct connections for tools like Excel. Every API response shows the exact SQL it ran, so you learn the query language while you learn the API.
Two audiences. SQL & API learners who want realistic data to practice against without installing anything, and analysts and finance professionals who want to connect familiar tools (Excel via native SQL Server or ODBC) to real databases and pick up API basics along the way.
Yes, it’s free, and there’s no sign-up, API key, or login for read access. Open the
playground or call an /api/… URL and you’re going.
Around a dozen sample databases across two engines — SQL Server (the primary engine)
and MySQL/MariaDB (secondary). You’ll find classics like northwind,
adventureworks and classicmodels. For the authoritative, always-current list,
call GET /api/catalog or browse the
schema explorer.
No — access is strictly read-only, enforced by the database credentials themselves.
You can run SELECT-style queries all day, but nothing you do can modify the data. That’s by
design so the sandbox stays safe for everyone.
Several sample databases were imported from Access-style sources, so you’ll see names like
Order Details or Country/Region. URL-encode spaces as %20 in your
requests (the playground handles this automatically), and note that the API bracket-quotes these names for
you in the SQL it generates.
Treat it as disposable. The platform can be rebuilt or refreshed at any time, so don’t rely on it for storage — it’s a learning sandbox, not a place to keep your own data.
Scope a URL by engine, database and table:
curl "https://learnsql.cpetoday.com/api/mssql/northwind/Customers?limit=5"
See the documentation for every endpoint and parameter, or let the playground build the URL for you.
Yes. List endpoints support page, limit, fields,
sort and order. There are dedicated /aggregate
(COUNT/SUM/AVG/MIN/MAX with group_by) and /join endpoints too — including joins on
differently-named keys via ?left= and ?right=. Full details in the
docs.
Yes — the API sends permissive CORS headers, so browser-based lessons and
fetch() calls from any origin work out of the box.
Errors come back as clean JSON — { "error": "…" } — with an appropriate HTTP status
(400 bad request, 404 not found, 500 server problem). The message is
written to be instructive rather than cryptic.
Absolutely — it’s a first-class use case. There are three paths: Excel’s native SQL Server connector, an ODBC Driver 18 DSN/connection string, and the Web API via Power Query. The Web API path is free and needs no login; the two direct-database paths use a read-only login included with your CPE Today course. Step-by-step instructions live on the Connect Excel & ODBC page.
The read-only database login is included — at no extra cost — with any CPE Today database or Excel course. Enroll once and you’ll receive credentials to connect Excel, Power BI or any SQL client, plus guided lessons that walk you through it. Browse courses at cpetoday.com →
Want to start with zero setup? The Playground and the open Web API need no login at all.
Host learnsql.cpetoday.com, SQL Server on port 1433 and MySQL on
3306. The username and password come with your
CPE Today course — see the
connection guide for the full walkthrough. Everything is read-only, so refreshes are safe.
Yes, intentionally — direct database access powers the Excel/ODBC lessons. Repeated failed logins are watched and automatically blocked, so the open ports don’t weaken the read-only sandbox.
Great! This is a teaching tool that improves with feedback. Note the exact URL you called and the response you got, and pass it along to whoever administers your LearnSQL instance.