Master SQL with
hands-on practice
70 PostgreSQL challenges on real university data, graded by results. 31 free, no signup.
No signup. No install. Real PostgreSQL in your browser.
Try it now
Finish the query, hit Run, and see it graded — right here, no account needed.
Find the top 5 students by GPA
Return the five highest-GPA students in Fall 2024, ordered by GPA descending. Show the student name and their GPA (averaged across all their Fall 2024 grades, rounded to two decimal places).
SELECT s.name, ROUND(AVG(g.gpa_points), 2) AS gpa FROM students s JOIN grades g ON g.student_id = s.id WHERE g.term = 'FALL2024' GROUP BY s.name -- Your turn: sort by gpa, highest first, and keep only five rows.
Schema
students
- id · int
- name · text
grades
- student_id · int
- course_id · int
- term · text
- letter · text
- gpa_points · numeric
What is QueryU?
QueryU is an interactive SQL learning platform built for the way analysts actually work. You write PostgreSQL against a realistic university dataset — students, courses, enrollments, grades, financial aid — and your queries are graded by the rows they return, not by character-for-character text matching. That means any valid SQL that produces the right result passes, and your style is your own. AI diagnostic hints and the smart SQL advisor come with every plan. Start with the first 31 challenges for free; upgrade to Pro for the full set of 70, speed bonuses, and the Intermediate and Advanced courses.
Result-set grading, not text matching
Most SQL practice sites fail your submission if your output has an extra space, a different sort order, or columns in a different order. QueryU compares the rows you return — any valid SQL that produces the right result passes, even if your approach looks different from the reference solution.
Real university data, not toy tables
We don't use the employees-and-departments schema you've seen on every tutorial site. QueryU's dataset is modeled on a real university student-information system. The joins span 5+ tables, the NULLs are real, and the questions look like the work analysts actually do.
How it works
Read up on a concept
Browse the Learn tab for plain-English guides on every SQL topic — SELECT, JOINs, CTEs, window functions, and more. Worked examples and a quick-reference for all the syntax. Free for everyone.
Walk through a guided course
Open the Courses tab for step-by-step interactive lessons. Each step has clear instructions and a starter query — fill in the blanks, hit Run, and the lesson advances when you pass.
Pick a challenge
Choose from 70+ SQL problems across Easy, Medium, and Hard tiers. Each challenge targets specific SQL concepts.
Write your query
Use the built-in SQL editor with syntax highlighting and auto-complete. Query real PostgreSQL tables modeled after university systems.
Get instant feedback
Your query runs against the database and is graded automatically. See a diff of your results vs. expected output, earn points, and track streaks.
Everything you need to learn SQL
A complete practice environment — from your first SELECT to advanced window functions.
Real SQL, real databases
Write and execute PostgreSQL queries against realistic Student Information System data — not toy datasets.
70+ challenges
From SELECT basics to multi-table JOINs and window functions. Easy, Medium, and Hard difficulty tiers.
Instant feedback
Your query runs in the browser and is graded automatically. See exactly where your result differs from the expected output.
Diagnostic hints
Stuck? Get targeted hints that point you at the bug in your query without giving away the answer.
Real-world datasets
Practice on data modeled on real university systems — student records, enrollments, courses, sections — the same shape as production analytics workloads.
Track your progress
Streaks, badges, speed bonuses, and a leaderboard keep you motivated as your SQL skills grow.
Where to next?
Prefer to explore before diving in? Pick your own path.
SQL learning resources
SQL for Beginners
Start with SELECT, WHERE, and ORDER BY
Read more →SQL JOINs Explained
Master INNER, LEFT, RIGHT, and FULL joins
Read more →SQL Practice Problems
Hands-on exercises for every skill level
Read more →GROUP BY Multiple Columns
Multi-column aggregation, the SELECT-list rule, and the pivot pattern
Read more →CTE / WITH Clause
Single, chained, and recursive Common Table Expressions
Read more →RANK vs DENSE_RANK vs ROW_NUMBER
Three ranking window functions, side by side, with PARTITION BY
Read more →CASE WHEN Conditional Aggregation
Pivot-style breakdowns and the FILTER clause shortcut
Read more →Group by Month with DATE_TRUNC
Time-series grouping for trend reports and funnel breakdowns
Read more →Frequently asked questions
Is QueryU free?
Yes — the first 31 SQL challenges are free, including every Easy challenge and an introductory set of Medium ones. No credit card required to start. AI diagnostic hints and the smart SQL advisor are included on both plans. The Pro plan ($9/month or $79/year) unlocks all 70 challenges, speed bonuses, and the Intermediate and Advanced courses. Progress tracking, streaks and badges are free on both plans.
Do I need to install anything?
No. Every query runs in the browser against a sandboxed PostgreSQL backend. There is nothing to install and no account needed to start — open a challenge and write SQL. If you create an account later, the progress you made before signing up comes with you.
What flavor of SQL does QueryU teach?
PostgreSQL — the most widely-used open-source database in modern data work. Most of what you learn translates directly to MySQL, SQL Server, BigQuery, Snowflake, and other dialects.
Who is QueryU for?
Anyone learning SQL — students, career-switchers, analysts, software engineers, and data professionals. The dataset is modeled on real university student information systems, so the challenges mirror the kind of real-world reporting questions analysts actually get.
How does QueryU grade my queries?
Result-set comparison, not query text matching. Your query runs against the live database and the rows you return are compared, with type coercion, against the expected result. Column order never matters, and row order only matters when the challenge says it does. You can write the solution any valid way and still pass.
What topics does QueryU cover?
SELECT/WHERE/ORDER BY, every JOIN type, GROUP BY and HAVING, subqueries and CTEs, window functions, NULL handling, set operations (UNION/INTERSECT/EXCEPT), date and string functions, CASE expressions, query performance with EXPLAIN, and more — across 21 in-depth lessons and 70 hands-on challenges.
Ready to level up your SQL?
Join students and professionals practicing SQL on QueryU. Start with 31 free challenges.
Solve your first query →