ignore entries without country code

This commit is contained in:
Sarah Hoffmann
2021-05-13 12:07:20 +02:00
parent 41b9bc9984
commit 8f2746fe24
2 changed files with 10 additions and 0 deletions

View File

@@ -157,6 +157,7 @@ def update_postcodes(dsn, project_dir, tokenizer):
ST_Centroid(ST_Collect(ST_Centroid(geometry))) as centroid
FROM placex
WHERE address ? 'postcode' and geometry IS NOT null
and country_code is not null
GROUP BY country_code, pc) xx
WHERE pc is not null
ORDER BY country_code, pc""")