Created
August 27, 2013 01:25
-
-
Save ebrelsford/6348685 to your computer and use it in GitHub Desktop.
Get the number of times the text on a sign occurs, as used here: http://cdb.io/15ekzYE
This file contains 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
UPDATE sign_application_filings s1 | |
SET text_occurrences = ( | |
SELECT COUNT(DISTINCT(s2.house, s2.street_name)) | |
FROM sign_application_filings s2 | |
WHERE s2.text_on_sign = s1.text_on_sign | |
) | |
WHERE text_on_sign != '' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment