Comment by mhuffman
8 days ago
>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.
No comments yet
Contribute on Hacker News ↗