Live data from Hacker News

Show HN: SQL Noir – Learn SQL by solving crimes

sqlnoir.com

81–90 of 90 posts

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#81
post #27

Love this! The style is unique and awesome. 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 thi…

Good notes indeed. I have just implemented a side by side view so that you can view 2 tabs at once. I hope this helps. Also as other users suggested you can use the notes for saving queries but you can also comment them out in the editor.

I love the updates! Side-by-side is great, the graph view is great. Awesome stuff! Thanks for sharing.

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#82

I'm on mobile, so maybe I'm missing something, but I don't understand how youbare even supposed to get started without knowing SQL. If this is supposed to teach SQL then there needs to be some tutorial to guide the way.

Querymon is a more tutorial-like SQL game:

https://www.youtube.com/watch?v=kkP_W8xFz5s

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#83

Earlier quoted context omitted.

That's how I solved #3, still trying to reverse-engineer the correct solution.

Isn't that the reversed method? You mean you're now trying to solve the crime the normal way instead of jumping to the last page of the book first?

Hmm it still feels apt, reverse-engineering anything is effectively starting at the last page of the book.

Re: Show HN: SQL Noir – Learn SQL by solving crimes

#84

I'm a big SQL noob, so I barely know what I'm doing, but... I managed to crash both Firefox and Edge whenever I ran this query: select * from crime_scene, suspects

>select * from crime_scene, suspects

This is a cross-join. It is the equivalent of a nested loop in programing and almost never what you want to do in a database unless you like watching high-combination data spewing out and CPUs burning. It gives you every combination of items in each table you name.

What you want is to find something in two or more of those tables that can be linked together somehow using (very likely!) "INNER JOINS". Look into examples or tutorials of those on the internet and use what you find to work through the tables on the "investigations". Luckily, the SQL Noir site tells you exactly the steps to take in the first case. You need to find a link somehow between the crime_scene and suspects tables and then another one between the matching suspects from the suspects table and the interviews table.

Note: there is no direct easy link between the crime_scene and suspects tables. You will have to use your investigation skills to trim the suspects list down.

Post reply on HN