Show HN: SQL Noir – Learn SQL by solving crimes (sqlnoir.com)
I built SQL Noir, an interactive detective game that challenges you to solve mysteries using real SQL queries. It’s fully open source, designed to give you a practical and immersive way to learn SQL while engaging with a narrative-driven mystery.
89 comments
[ 5.2 ms ] story [ 168 ms ] threadThe schema ui seems to be big because of the graph display… which is not at all done baking yet. The hard part of displaying graphs is the pathing, and the very first one I opened has an arrow coming from the left, going across the mode, and attaching to the right side. In a perfectly horizontal line. That’s gonna need to cook a lot longer. It it worth having a bad vis over having no vis?
(I also struggled with the schema because crime_scene was singular and suspects was plural!)
Firstly - great work - one of my favourite games is Chronicles of Crime and this immediately made me think back to how I would've gone about investigating some of those stories using SQL.
w.r.t the comments - you can add `--` to comment out lines of queries but when I do it on two or more lines they get mashed into a single line and I can't reliably uncomment them again without the queries getting mangled.
I've found you can use multiline comments /* and */ though which worked for me - just a bit more back and forth on the keyboard.
Anyway - again - awesome work.
https://en.m.wikipedia.org/wiki/Mathnet
https://youtu.be/vNhBq3kjq_Q?t=2011
Ah, that's a classic "use after free" vulnerability.
Badges for completing challenges.
Issue Closed, Won’t Fix.
Badges?? We don’t need no stinking badges!
I remember getting really into it, even going to the extreme of trying to find the most efficient one-liner solution.
Thanks for making this. I’ll be passing the torch by linking it to anyone interested in learning SQL.
One small thing which would be nice is the ability to just download the sqlite database myself so I could use my preferred application to query it, and just use the site for the brief, notes and submission.
Also a nitpick, while you say it's for "learning" SQL, I would probably expect something a little more guided, or at least some example queries, if the intention was to teach SQL. As it stands, if you don't know SQL you're probably going be completely lost as to what you should be doing. It's really cool, just not specifically as a learning tool.
By the way, I was trying to use a bunch of one-liner SQL statements to explore the data, and it seems like the editor doesn’t handle comments very well. Is there a way to make it work better?
I guess I’m used to sql server management studio I tried running multiple queries at once and wasn’t able to. I also tried writing a comment with two dashes to keep track of the id’s and it replaced most of my query with dashes. It might have something to do with being on mobile on iOS.
I see the beginnings of a really fun way to learn / practice / remember SQL.
A few notes:
- Would be cool if it was a single workspace (no tabs). Was constantly switching tabs back and forth.
- Saving previous SQL queries and results would be cool. I was copying results into the notes. Feel like this is important as things get more complex.
Excited to see where you take this!
I imagined myself with my flip notepad at the crime scene taking notes every time I'd copy queries/results to the notepad section. All I needed was a hat, and then say "just the facts, ma'am" a couple of times.
education needs more stuff like this - less matter-of-fact regurgitation of information (which ai does an okay job of anyhow) and more creativity.
The results header is screwed up, there is an extra 'id' column. At least on firefox.
There's also plenty of ways to teach. Some methods assume a basic level of the concepts involved, but by continuing, you'll be exposed to new concepts that level up those skillz. Just like how arithmetic comes before algebra comes before trig comes before calculus.
https://www.youtube.com/watch?v=kkP_W8xFz5s
also: https://en.wikipedia.org/wiki/Hobby
I've seen it advised to list table names as plurals as it holds more than one of the things. I've been told plural is dumb. I've not yet run into mixed plurals and singular table names. Sure, it's a style, but pick one???
I'm guessing this is like tabs vs spaces, but would a tab person use spaces randomly or vice versa?
otherwise, it's a fun way to kill some time. clearly, i played with it long enough to notice this little bitty bit of something. however, if only modern police departments had this ability to link clues. there's no way to drip donut cremes or spill coffee on these notes
It's hard to explain, but you can reproduce like this:
1. Write several lines, for example:
2. Try to comment each line on its own by typing -- in front of each line. 3. As soon as you do it for "from interviews i", that line will move itself to the previous line, and the syntax highlighting will be broken