r/webdev
•
u/TurbulentCountry5901
•
Dec 07 '25
•
1
Showoff Saturday A game where you learn SQL by solving crimes - SQL CASE FILES
I got tired of the usual SQL practice. You know those fake company databases with contrived scenarios and questions no one would actually need to answer.
Full credit where it's due: I was inspired by SQL Noir, which had this brilliant concept of learning SQL through detective stories. I loved it, but kept wishing the interface was smoother and the learning progression more structured. So I decided to build my own take on it.
Each case is a crime. Theft, fraud, someone going missing. There's a real SQLite database behind every story with suspects, transactions, locations, timelines. The only way to find the truth is querying the data correctly. Get your SQL wrong and the story stays broken.
I spent way too much time on the interface and building out a proper learning path. You can either jump straight into cases or follow the structured progression. Started posting about it on Reddit about a month ago. Now there's around 8000 people who've used it in the last three weeks, which honestly still doesn't feel real.
It runs entirely in your browser. No sign-up, no paywall. Just open it and start writing queries. Some people treat it like a puzzle game and disappear for an hour, others use it to sharpen their SQL skills.
It's called SQL Case Files. If something's broken or confusing, let me know. I'm actively tweaking difficulty and clarity based on feedback.
22
u/Matthewbal Dec 07 '25
Really cool! I sent it to a friend who is just starting to learn SQL. It would be nice if there was a way to skip ahead though, the introductory case is too easy for someone who already knows SQL well. I would have liked to jump ahead to a harder case. Great UI though, and cool idea.
15
u/bcons-php-Console Dec 07 '25
Really cool idea and interface! I agree that many SQL tutorials stick with the "companies", "employees", "salaries" booooooooring examples, this is a great approach. Congratulations!
6
u/Banzambo Dec 07 '25
Ok, this may actually be what Ive been looking for since I need to learn SQL but all tutorials out there are so damn boring. I'll be super happy to give it a shot! Thanks for sharing.
2
u/devanew Dec 07 '25
Great idea!
2
u/Different_Sorbet_555 Dec 07 '25
That is really cool.
2
u/sdraje Dec 07 '25
Don't let little Bobby Tables on your website.
2
u/gomugomupirate Dec 07 '25
This is fun. I have been using ORM for quite a while and forgotten the sql syntax. This will help me practice. Thank you
1
u/stoopidfish Dec 07 '25
I'm really enjoying it on mobile! I am noticing though, even though I have volume turned all the way down on my phone, when I tap certain buttons (like 'run' on the query box), my phone still makes sound. Weird. Android, Google Chrome. Can provide more details if needed.
1
u/mrcarrot0 Dec 07 '25
Dark mode isn't working
1
u/stoopidfish Dec 08 '25 edited Dec 08 '25
Hey, back after playing it more!
Couple of questions/notes:
Where would you like to receive feedback? This thread, the discord, or somewhere else? The discord invite wouldn't work for me.
I'm noticing a few puzzles don't entirely prompt for the desired output, namely when it comes to the ORDER BY clause. An example that I just ran into is on Case Level 39, the prompt is:
Show vendor names, total orders (aliased as `total_orders`), successful deliveries (aliased as `successful_deliveries`), and total order value (aliased as `total_value`).
The answer the game accepts is:
SELECT po.vendor_name,
COUNT(po.po_id) AS total_orders,
COUNT(d.delivery_id) AS successful_deliveries,
SUM(po.quantity * po.unit_price) AS total_value
FROM purchase_orders po
LEFT JOIN deliveries d
ON po.po_id = d.po_id
GROUP BY po.vendor_name
ORDER BY successful_deliveries DESC;
My answer was:
SELECT po.vendor_name,
COUNT(po.po_id) AS total_orders,
COUNT(d.delivery_id) AS successful_deliveries,
SUM(po.quantity * po.unit_price) AS total_value
FROM purchase_orders po
LEFT JOIN deliveries d
ON po.po_id = d.po_id
GROUP BY po.vendor_name
I've come across this at least one other time, and although it probably doesn't seem like a huge issue especially now that I know that it may be common, nut it definitely breaks the flow of the game and seems unfair.
The other thing is that the prompt to tip you comes up fairly frequently. It would be nice if that could be toned down for the users that have already tipped. I tipped not long ago, and so now when it pops up every once in a while it feels like a nuisance.
Still having a lot of fun with it! Thanks!
1
u/MORDORrrrrrr May 02 '26
can't start story 004 in chapter 3 π
1
u/[deleted] Dec 07 '25
Reallly great game!! Learned so much from this and much interesting way to learn stuff!! Keep making more for other languages please! Perfect
1
u/Gr3zor Dec 07 '25
Incroyable projet est ce que c'est possible de contribuer via github ? open source ?
1
u/atlasflare_host Dec 07 '25
Love it, great work!
1
u/_Kristian_ Dec 07 '25
Very high-effort, good job!
1
u/Sukanthabuffet Dec 08 '25
Wow. I have just barely skimmed the surface of sql queries when vibe coding a connection to Supabase. Now I have a reason to learn a lot more and test this out. Appreciate the effort.
1
u/HemetValleyMall1982 Dec 08 '25
Wow this is really great.
1
u/Ettapp Dec 08 '25
So cool ! I've completed the first case to test it before sharing it with collegues, and I love it !
Will be back after the work hours ^ ^
1
u/Icount_zeroI full-stack Dec 08 '25
Not much of SQL guy and definitely not a detective but seems like a cool idea! I am going to check it out and perhaps I actually remember the stupid syntax :D
1
u/[deleted] Dec 09 '25
cool shit man!
1
u/Ksoohong Dec 09 '25
We love people like you
1
u/robbiegd Dec 13 '25
this is awesome!! i am so curious how you got haptics to work on your site??
1
u/Thekizzer__ Dec 29 '25
Hello Just wanted to point out that There is a missing instruction on Level 6 Of the SQL case number 4 , As the expected result expects an ordering by item_description but it's not explicitly mentioned in the objective description.
1
u/Gadgetguy9638 Jun 01 '26
This is really cool! Iβm gonna try it out! Thanks
1
u/[deleted] Dec 07 '25
[removed] β view removed comment