MotaDan / PoliceData

0 stars 0 forks source link

Add locations, at exact addresses, with over 250 incidents to nicenames #6

Closed MotaDan closed 8 years ago

MotaDan commented 8 years ago

This is referring to places that are actual addresses and not just the intersection of two roads.

This command will give the first 50 non-nicename containing addresses based on incident count. SELECT COUNT(*), calls.*, nicenames.desc FROM calls LEFT JOIN nicenames ON calls.address LIKE '%' || nicenames.address || '%' WHERE nicenames.address IS NULL GROUP BY calls.address ORDER BY COUNT(*) DESC LIMIT 50;