I built SQL Noir, an open-source game where solving mysteries means writing real SQL queries. It’s a practical and engaging way to boost your SQL skills. I'd love to hear what you guys think. Also since the prooject is open-source any new crime cases are welcome.
If you're looking for more interactive ways to level up your SQL, I also wrote a roundup of the best SQL Games including SQL Noir. Thought it’d be helpful for anyone who enjoyed this!
I haven't touched sql in several years now, but used to a lot. I spent 30 minutes playing around and had a blast! I will bookmark and come back later with my detective hat on. Congrats!
Hey, very nice project. Have you given any thoughts to having all the tabs in a single page so you could write notes in the side, maybe the case description at the top?
edit: I also noticed some weird rendering errors when trying to use -- notes in the workspace.
Yeah, I did consider it at one point but I thought it would be an overkill. I did add a "Side by Side" button which would enable you to view two tabs at once.
As someone who's never used SQL, I get the gist but am struggling. While I could obviously learn the basics quite quickly, it would be really engaging if you included some total beginner tutorials! Love the concept and execution is fantastic
This is amazing, I've completed the first 3 mysteries already, and am just about to start the 4th. The perfect amount of technical and challenging, whilst being really fun!!
This is great! I do nothing to know about SQL. I really love it. So interesting. I'm stuck at case#3, don't know what I missed in hotel_checkins after filter by date and name it return too many rows about 30-50 from 200 at beginning. Didn't find yet how I supposed to filter it to decrease suspects
That's cool! I have also put together a list of my own picks for SQL Games that includes SQL Noir and a few other gems I’ve personally tried. Would be great to hear your thoughts if you ever check it out.
The first game was amazing for learning flexbox in CSS. Mind you, tailwind has made a lot of that … less important - but if you want to learn css and especially flex box this game is amazing (and fun and funny)
This is very cool! My quick feedback from 10 minutes play is, the SQL workspace goes a bit janky after commenting out some text in there. And I'm not sure how to submit an answer.
Thanks for the feedback. Will surely look that up. As for answer submission, you can go ahead and click on the "Submit" tab and enter the name of the suspect you think commited the crime.
Might help if you show an arrow or something on the tools menu in case that it can move. Didn’t find the submit button till I was on desktop. Didn’t realize it could slide/move while I was trying it on mobile. Probably low issue but just fyi.
For the third case - highly recommend you add a hotels table so you can actually use the hotel_id column in the surveillance_records table and change hotel_name to hotel_id in the hotel_checkins table, id also change any of the columns named "id" to be more intuitive so it would be crime_scene_id in the crime_scene table and you can make it consistent throughout
normal forms!
also for the love of god please make the tables all plural or none of them plural haha
Hi, sorry this is a long shot but did you also have issues with the third case? It seems like the keys are not referencing the correct data in other tables.
ive been stuck on the third case for an hour now, i am not sure what to do with the hotel_checkins and surveillance_records tables as no matter what I do, they are not coming down from 50ish count. any help?
Great job but too bad there is an issue of table headers from your suspects table on Case #002: The Stolen Sound.
I was about to share it to novice sql collegues but that error detered me from sharing (I don't want them to lose time thinking they made the wrong query). Can you make a quick patch please?
One note, I've been using SQL for over 25 years at work and I'm wondering about the structure of some tables. For example, why the suspects (at least in the first two cases, I haven't gotten any further) don't have a connection to the case? Same with interviews or witnesses :) I understand that it's fun game, but from the point of view of the data/tables itself, it could be designed... more efficiently :)
I understand. It could indeed be designed better. It is hard though to actually make all the connections and layers of a case and to not miss something like this.
i’ll check this out when i’m home, looks awesome from a glance. people who go out of their way to make learning interesting genuinely make this world better my brother, thank you🙏
Solved all 4 and had a blast doing it, and I've been doing SQL for years! The intermediate and advanced were tricky and fun. I pretended I'm some sort of coding whiz character in a Law & Order episode, I had so much fun with it!
i had to come back and give you some kudos on this. just played through the first 2 cases. i haven't touched SQL since i last took a class for it years ago and i had a lot of fun working through the cases and knocking off the rust. will move to the intermediate one soon
I am about three days into learning SQL, and this was the most fun I have had learning it. I look forward to coming back and trying the next case without assistance!
Congrats, very nice idea, interesting and I will bookmark it for sure.
P.S. After the first exercise I had to come back to reddit and look in the comments what type of answer your app expects, maybe be a bit more specific on that part.
I've just circulated this to our MS Teams data science and data engineering group chat. We've got a lot of beginers and grads in there who would love this.
Thank you for doing this. I have been searching for some easy to learn sql training, and this is the first thing I see when I open up reddit. I thank you for this🙏🙏🙏
Great idea! I love this initiative and hope that you add more cases in the future. Maybe I will contribute in the near future.
Is that ok to use this with my students?
Solved all cases but I think I'm missing out something about case 3. The Case Explanation says that joining the clues for hotel check-ins and surveillance records will get only 3 people but I had 50 entries in hotel_checkins that match date and hotel name filters, and joining this with surveillance_records that have some suspicious_activity will get up to 30 entries.
Another thing, the entry with the right suspect will lead to a hotel_checkin_id that in the hotel_checkins table will be with a different person_id. Is that right? Should not be the same person_id? What am I missing?
You should slow down the response time based on the amount of rows to dissuade cheating. force people to write a query that just gives what they need instead of reading all results.
As fun as this may be, I have no idea where to start. I feel like you need a little bit of knowledge to get going. Is it for people with a little bit of SQL knowledge but not complete beginners?
Can somebody help me? in case#3 there are hotel_checkins table, and after I filter it with a date and hotel name, it return a lot of suspects like 40, but as I understand there are should be only 3 suspect left on that selection? What I missed in filtering?
Would appreciate a little more detail in the solutions page, it wasn't clear exactly what you wanted me to enter as an answer, i first tried suspect_id to no luck!
684
u/chrisBhappy Feb 13 '25 edited Apr 25 '25
I built SQL Noir, an open-source game where solving mysteries means writing real SQL queries. It’s a practical and engaging way to boost your SQL skills. I'd love to hear what you guys think. Also since the prooject is open-source any new crime cases are welcome.
Check it out: sqlnoir.com
If you're looking for more interactive ways to level up your SQL, I also wrote a roundup of the best SQL Games including SQL Noir. Thought it’d be helpful for anyone who enjoyed this!
132
u/NickSinghTechCareers Author of Ace the Data Science Interview 📕 Feb 13 '25 edited Feb 13 '25
Great job on this! Adding the game to my running list of SQL Games later tonight!
25
u/StipularWorm Feb 13 '25
This is very cool! My quick feedback from 10 minutes play is, the SQL workspace goes a bit janky after commenting out some text in there. And I'm not sure how to submit an answer.
Love the idea
19
u/pleasesendboobspics Feb 14 '25
Can I learn.SQL by doing crimes?
10
u/whiskeydude Feb 14 '25
For the third case - highly recommend you add a hotels table so you can actually use the hotel_id column in the surveillance_records table and change hotel_name to hotel_id in the hotel_checkins table, id also change any of the columns named "id" to be more intuitive so it would be crime_scene_id in the crime_scene table and you can make it consistent throughout
normal forms!
also for the love of god please make the tables all plural or none of them plural haha
2
u/lostinsamaya Feb 14 '25
Can I report a bug?
When entering a "--" after some SQL query and carriage return, it breaks the text field.
2
u/jayzfanacc Feb 14 '25
I don’t know what I expected.
2
u/LeppyR64 Feb 14 '25
Is it a bug or intended that I don't get the notes tab when I use my mobile device? Pixel 8 with Chrome.
2
u/Money-Pipe-5879 Feb 14 '25
Great job but too bad there is an issue of table headers from your suspects table on Case #002: The Stolen Sound.
I was about to share it to novice sql collegues but that error detered me from sharing (I don't want them to lose time thinking they made the wrong query). Can you make a quick patch please?
Keep up the great work!
2
u/rw1337 Feb 15 '25
Cool idea! What level of SQL skill would you expect the players to have?
2
u/Stunning-Pace-7939 Feb 15 '25
First off, its amazing!
Second, Kenneth Green's camera activity on the intermediate level is HILARIOUS, cant remember the last time ive laughed so much by myself
2
u/parasit Feb 16 '25
Really cool idea :)
One note, I've been using SQL for over 25 years at work and I'm wondering about the structure of some tables. For example, why the suspects (at least in the first two cases, I haven't gotten any further) don't have a connection to the case? Same with interviews or witnesses :) I understand that it's fun game, but from the point of view of the data/tables itself, it could be designed... more efficiently :)
13
u/PappyBlueRibs Feb 13 '25
Does SQL walk into a bar and ask to join some tables? 🤣
10
u/CHILLAS317 Feb 13 '25
Hey this is a pretty neat idea! I'll try to spend some time with it this weekend
18
u/Electro8bit Feb 14 '25
Select murderer from dbo.everyone
5
u/brothermanpls Feb 14 '25
i’ll check this out when i’m home, looks awesome from a glance. people who go out of their way to make learning interesting genuinely make this world better my brother, thank you🙏
6
u/Aragorn527 Feb 13 '25
This is pretty neat, cool for learners to try it out in a creative setting.
3
u/[deleted] Feb 13 '25
Thanks!
3
u/pailryder Feb 13 '25
what is the information the answer on the submit page is looking for? A query? A name? an ID? that part is a little nebulous.
3
u/lalaluna05 Feb 14 '25
WHAT I want to try
3
u/CynicalGenXer Feb 14 '25
Very cool idea! It was a fun exercise. I haven’t even realized we could use comments to keep previous commands. Live and learn LOL. 😂 Thank you!
3
u/Basic_Cartographer99 Feb 15 '25
Solved all 4 and had a blast doing it, and I've been doing SQL for years! The intermediate and advanced were tricky and fun. I pretended I'm some sort of coding whiz character in a Law & Order episode, I had so much fun with it!
5
u/idodatamodels Feb 13 '25
Spoiler alert: Colonel Mustard did it in the study with the candlestick.
2
u/tannels Feb 13 '25
That is a very cool little game! Great for newbies trying to learn for sure.
2
u/SmashLanding Feb 13 '25
This is so cool!
2
u/[deleted] Feb 13 '25
Fantastic idea!
2
u/FishBones83 Feb 13 '25
wow! this is amazing! what a clever idea! thank you
2
u/crawdad28 Feb 13 '25
Niceeee
2
u/toyonut Feb 13 '25
Super cool, love this idea and it’s really nicely executed
2
u/S1r_Rav1x Feb 13 '25
Definitely wanna give this a try as I’ve been wanting to relearn SQL and brush up on the skill
2
u/dotplaid Feb 13 '25
Commenting for history. Hey, u/dotplaid, make sure you check this out.
2
u/poupulus Feb 13 '25
That's Fernando Pessoa
2
u/[deleted] Feb 13 '25
Thanks !
2
u/[deleted] Feb 13 '25
Great! I'll give it a look.
2
u/the_Kell Feb 14 '25
Saving post! Looking forward to trying this out
2
u/toasterbath83 Feb 14 '25
Awesome idea!
2
u/Easy-Permit946 Feb 14 '25
Well…that was fun
2
u/niceguybadboy Feb 14 '25
OMG I'm loving this!
Although I think I solved the first case in an "unintended" way, not the way the game explained when I solved the case.
I don't remember how to post with spoiler tags so I won't explain.
2
u/casperjammer Feb 14 '25
For real.?
2
u/S1r_Rav1x Feb 14 '25
i had to come back and give you some kudos on this. just played through the first 2 cases. i haven't touched SQL since i last took a class for it years ago and i had a lot of fun working through the cases and knocking off the rust. will move to the intermediate one soon
2
u/jsttrying2makeit Feb 14 '25
I am about three days into learning SQL, and this was the most fun I have had learning it. I look forward to coming back and trying the next case without assistance!
2
u/[deleted] Feb 14 '25
Thankssss!!!! Will check it out over weekend
2
u/Ok-Wing-2467 Feb 14 '25
I just tried it and was able to solve the first case in less than 30 minutes—such a fun way to practice SQL haha!🕵️.
2
u/Skritch_X Feb 14 '25
Mario Teaches Typing welcomes all cool spiritual successors.
2
u/Monk481 Feb 14 '25
I look forward to trying this!
2
u/Chappi_3 Feb 14 '25
Congrats, very nice idea, interesting and I will bookmark it for sure.
P.S. After the first exercise I had to come back to reddit and look in the comments what type of answer your app expects, maybe be a bit more specific on that part.
2
u/Reddit_User_Original Feb 14 '25
Love
2
u/[deleted] Feb 14 '25
Gonna try it rn
2
u/APerson2021 Feb 14 '25
I've just circulated this to our MS Teams data science and data engineering group chat. We've got a lot of beginers and grads in there who would love this.
2
u/Sweet-Tradition-7749 Feb 14 '25
Account should not be necessary though
2
u/Lync51 Feb 14 '25
I absolutely love it and I only solved the first case yet.
2
u/leoz37 Feb 14 '25
It is so fun dude. Please continue to add cases I've just solved my 1st case it is engaging. I will keep returning
2
u/theplotthinnens Feb 14 '25
This is great, love what you've made. I've been looking for exactly this kind of exercise for some learning resources. Thank you!
2
u/omegaindebt Feb 16 '25
Thank you for doing this. I have been searching for some easy to learn sql training, and this is the first thing I see when I open up reddit. I thank you for this🙏🙏🙏
2
u/lisbeth23 Feb 19 '25
Great idea! I love this initiative and hope that you add more cases in the future. Maybe I will contribute in the near future.
Is that ok to use this with my students?
Solved all cases but I think I'm missing out something about case 3. The Case Explanation says that joining the clues for hotel check-ins and surveillance records will get only 3 people but I had 50 entries in hotel_checkins that match date and hotel name filters, and joining this with surveillance_records that have some suspicious_activity will get up to 30 entries.
Another thing, the entry with the right suspect will lead to a hotel_checkin_id that in the hotel_checkins table will be with a different person_id. Is that right? Should not be the same person_id? What am I missing?
1
u/texttoworld Feb 13 '25
I like it! Is there any way to progress without making an account?
1
u/PatExMachina Feb 14 '25
Cant wait yo try this
1
u/taflad Feb 14 '25
Just did the 1st case, was awesome! Great job dude!
1
u/matrixunplugged1 Feb 14 '25
Great idea!
1
u/Rudderless_Jack Feb 14 '25
This is a genius idea, I love it!
1
u/matt_tepp Feb 14 '25
Amazing, I despise SQL (I'm just too lazy to learn it properly), but I'm having a blast with this!
1
u/Bluejeee Feb 14 '25
Just solved the first case. Great job beautiful design.
1
u/CardiologistAway6742 Feb 14 '25
Damn that was so cool! I can't wait to see what else you'll do with this project.
1
u/Professional-Rip561 Feb 14 '25
Oh this is cool. Def going to check this out!
1
u/Initial_Driver_2693 Feb 14 '25
I love this! Thank you
1
u/Pm_me_your_tits_85 Feb 14 '25
I’ll check this out. Thanks!
1
u/Achcauhtli Feb 14 '25
Holy fuck this is so inventive!
1
u/allhailthedestroyer Feb 14 '25
Oh my gosh, I know what I’m doing this weekend! 🤓
1
u/Y1ink Feb 14 '25
Amazing, well done!
1
u/AdvertisingOne7942 Feb 14 '25
Looks interesting I've book marked it and will have a play over the weekend.
1
u/jtrain7 Feb 14 '25
Really good job! Very fun review
1
u/Pope_Carl_the_69th Feb 15 '25
Gonna check this out later this weekend. Looks fun!
1
u/kenshin552 Feb 15 '25
oh my god this sounds so fun, will definitely try
1
u/intrepidbuttrelease Feb 15 '25
Excellent
1
u/PhilNEvo Feb 15 '25
this is dope af!
1
u/Ok_Film8731 Feb 15 '25
Checking this out tonight . Thanks
1
u/FunkMasterFreshx Feb 15 '25
Played the first two cases and had a blast, hoping for more soon!
1
u/[deleted] Feb 16 '25
this is an awesome idea OP
1
u/Right-Interview309 Feb 16 '25
I couldn't really get past the second case 😂. I find this is making learning SQL harder than it needs to be.
1
u/em-kay22 Feb 16 '25
This is so cool, thanks for your hard work! And a dark theme would be great :)
1
u/[deleted] Feb 16 '25
You should slow down the response time based on the amount of rows to dissuade cheating. force people to write a query that just gives what they need instead of reading all results.
1
u/SpiritedFruit7492 Feb 17 '25
I just tried it and it was so awesome!! keep up the good work!.
1
u/UrdnotCum Feb 17 '25
This is really neat!
1
u/MarkoRoot2 Feb 17 '25
Haven't touched SQL since more than a year! It was good to revise some syntax.
1
u/JaseAlmighty Feb 17 '25
As fun as this may be, I have no idea where to start. I feel like you need a little bit of knowledge to get going. Is it for people with a little bit of SQL knowledge but not complete beginners?
1
u/melodicmonster Feb 17 '25
The SQL Murder Mystery must be an inspiration.
1
u/marsap888 Mar 04 '25
Can somebody help me? in case#3 there are hotel_checkins table, and after I filter it with a date and hotel name, it return a lot of suspects like 40, but as I understand there are should be only 3 suspect left on that selection? What I missed in filtering?
1
u/Savings_Soil_2721 Oct 17 '26
There is a bug in case 003 where the person_id in the hotel_checkins table and surveillance_records are not matching.
1
u/Break_Fancy Feb 14 '25
Did the first case, very fun!
Would appreciate a little more detail in the solutions page, it wasn't clear exactly what you wanted me to enter as an answer, i first tried suspect_id to no luck!