Skip to content

Commit

Permalink
fix: sql syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaszkowic committed Sep 30, 2024
1 parent e5bed7b commit 6983a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions harvester/src/mapbox_tree_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def generate_trees_csv(temp_dir, db_conn):
ST_X(geom) AS lng,
trees.radolan_sum,
trees.pflanzjahr,
COALESCE(SUM(w.amount), 0) AS watering_sum
COALESCE(SUM(w.amount), 0) AS watering_sum,
trees.bezirk as district
FROM
trees
Expand All @@ -72,7 +72,7 @@ def generate_trees_csv(temp_dir, db_conn):
WHERE
ST_CONTAINS(ST_SetSRID ((SELECT ST_EXTENT (geometry) FROM radolan_geometry), 4326), trees.geom)
GROUP BY
trees.id, trees.lat, trees.lng, trees.radolan_sum, trees.pflanzjahr;
trees.id, trees.lat, trees.lng, trees.radolan_sum, trees.pflanzjahr, trees.b ezirk;
"""
)
trees = cur.fetchall()
Expand Down

0 comments on commit 6983a1b

Please sign in to comment.