Remove unneeded "else null" in conditions (#732)
Minor code cleanup: SQL already returns NULL in the "WHEN" condition if it is not matched by any of the cases. Co-authored-by: Eva Jelinkova <evka.jelinkova@gmail.com>
This commit is contained in:
@@ -3,8 +3,7 @@ CREATE MATERIALIZED VIEW osm_poi_stop_centroid AS (
|
||||
SELECT
|
||||
uic_ref,
|
||||
count(*) as count,
|
||||
CASE WHEN count(*) > 2 THEN ST_Centroid(ST_UNION(geometry))
|
||||
ELSE NULL END AS centroid
|
||||
CASE WHEN count(*) > 2 THEN ST_Centroid(ST_UNION(geometry)) END AS centroid
|
||||
FROM osm_poi_point
|
||||
WHERE
|
||||
nullif(uic_ref, '') IS NOT NULL
|
||||
|
||||
Reference in New Issue
Block a user