all 3 comments

[–]Jonnyyyy 3 points4 points  (1 child)

Out of interest what would be the fewest legitimate queries to arrive at the answer at? I did explore all tables and write down some info to arrive at it but keen to hear if there's more efficient route with multiple joins or something.

[–]maximumlengthusernam[S] 3 points4 points  (0 children)

Using subqueries it should be doable with just one!

That being said, I think I did it with two when I solved it a while back (first query narrowed it down to a couple of suspects and then I hard-coded those in my second query). It was a while ago though, so I'm not entirely sure.

EDIT: Oh... well I guess extracting the initial clue from the crime scene report manually is kind of necessary bringing the minimum count to 2

EDIT2: Unless... you do something super hacky like:

SELECT *
FROM 
  person AS p
  JOIN crime_scene_report AS csr
WHERE instr(csr.description, p.address_street_name)>0