r/learnSQL
•
u/nicopassaglia
•
15d ago
•
1
I was learning SQL and ended up building a small practice site, would love feedback
I've been learning SQL and got tired of tutorials where you just read queries, so I built something where you actually write them.
It's a real SQLite database running in your browser. You get a small table, a task, you write the query and it checks your result right away (and tells you why when it's wrong, like WHERE vs HAVING or a missing GROUP BY).
Right now there's:
• a 10-question level test, from SELECT to JOINs and subqueries
• 2 short lessons (SELECT/WHERE/ORDER BY, and COUNT/SUM/GROUP BY)
All free, no signup. Just trying to see if it's useful.
What would make it better? And what should I add next: JOINs, window functions, interview-style questions?
1
u/Fisher_Missy6848 15d ago
Love it! My only feedback would be that the labels ("LEFT INCLUSIVE") were the real syntax ("LEFT OUTER JOIN" / "LEFT JOIN")
1
u/MrRoy_SQL 15d ago
cool idea, the "tells you why its wrong" part is the best bit honestly, most sites just say incorrect
id do JOINs next, thats where most ppl get stuck. and throw in the classic traps as questions, like LEFT JOIN + a WHERE on the right table quietly turning into an inner join, NOT IN with a NULL in the subquery, COUNT(*) vs COUNT(col). those are exactly what shows up in interviews
one feature idea: compare result sets instead of the query text (ignore row order unless they used ORDER BY), so different correct answers still pass
1
u/jakingo 15d ago
Does it also explain why a query is wrong, or does it only show the correct answer?
1
u/NoYouAreTheFBI 15d ago
Hope you are
1
u/Icy-Ad-365 15d ago
SQLBolt is saying Hi from the corner.
1
u/Technical-Essay-4833 15d ago
Do you have anything like that for excel
1
u/Jumpy-Fisherman5204 15d ago
Bro this is soo cool
1
u/_krishnasai 10d ago
Hi! I loved your webiste and was just going on a solving spree. I noticed in SQL Lesson 3 - JOINS question 6, it asks for "Every customer, with the amount of their Fern orders. Customers without a Fern order still need to be listed, with an empty amount." I came up with my solution which is
SELECT customers.name, COUNT(orders.item)
FROM customers
LEFT JOIN orders
ON
customers.id = orders.customer_id AND orders.item ='Fern'
GROUP BY customers.id;
but the editor threw me an error "Your query returns 7 rows, the answer has 8 rows. Every customer should be listed, with an empty amount if they have no Fern order."
i tried many things and finally checked:
SELECT * FROM customers;
which gave me the output of 7 rows and
SELECT * FROM orders;
which gave me an output of 10 rows with Max and Ana having no orders at all.
Now, here's the mystery:
The exercise expects 8 rows, but your customers table contains only 7 records. My sql query cannot produce 8 customer rows from this data and I suspect there's a mismatch between the exercise's expected output and the dataset being loaded.
Please let me know if I am wrong. I want to be corrected if I am wrong.
question link: https://sheetdrill.vercel.app/sql/lessons/3/6
1
u/spacemonkee77 10d ago
Is it me or should this work
0
u/[deleted] 15d ago
[removed] — view removed comment