3 ms·
You really need 3 for the first puzzle and 1 for the second puzzle. Spoilers ahead: - 1st query to get the crime report. This contain plaintext clues. - 2nd
by olsgaarddk 5y ago
You really need 3 for the first puzzle and 1 for the second puzzle.
Spoilers ahead:
- 1st query to get the crime report. This contain plaintext clues.
- 2nd query to get witness interviews. Again, these contain plaintext clues that can't be used in a `join` statement or a `where` statement in SQL.
- 3rd query to get interview with suspect. This contain plaintext information needed for solving the second puzzle
- 4th query for finding the master mind.
Short of writing regexes that basically extracts the clues by looking for patterns that are verbatim the clues themselves, I don't see how it can be done any shorter than this.
You can see my solution here on my github: https://github.com/olsgaard/sql_murder_mystery_solution/blob/main/sql_murder_mystery.ipynb https://github.com/olsgaard/sql_murder_mystery_solution/blob...
- olsgaarddk 5y agoI took a hint from Gorkish, having never heard of SQL triggers before, and I gotta say, the 2-query answer is really thinking out of the box and very clever. I learned a lot from it!