Created
November 14, 2012 23:52
-
-
Save rjmackay/4075685 to your computer and use it in GitHub Desktop.
OVL default location query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT incident.id, | |
incident.location_id, | |
location.id, | |
location.latitude, | |
location.longitude, | |
form_response.incident_id, | |
form_response.form_response, | |
form_response.form_field_id | |
FROM incident INNER JOIN location ON incident.location_id = location.id | |
INNER JOIN form_response ON incident.id = form_response.incident_id | |
WHERE location.latitude='40.695777' AND location.longitude='-100.595541' AND form_response.form_field_id IN (4,5,6,7) | |
ORDER BY incident.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment