From aab8b84d54219044b75c5f2858dbaf329bc5919c Mon Sep 17 00:00:00 2001 From: gabrielwol <80077912+gabrielwol@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:22:35 -0500 Subject: [PATCH] #1120 fix ambigous column in function-aggregate_volumes_daily.sql --- .../sql/function/function-aggregate_volumes_daily.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/volumes/miovision/sql/function/function-aggregate_volumes_daily.sql b/volumes/miovision/sql/function/function-aggregate_volumes_daily.sql index 4b0433ee3..95f8dfcab 100644 --- a/volumes/miovision/sql/function/function-aggregate_volumes_daily.sql +++ b/volumes/miovision/sql/function/function-aggregate_volumes_daily.sql @@ -4,7 +4,7 @@ CREATE OR REPLACE FUNCTION miovision_api.aggregate_volumes_daily( intersections integer [] DEFAULT ARRAY[]::integer [] ) RETURNS void -LANGUAGE 'plpgsql' +LANGUAGE plpgsql COST 100 VOLATILE @@ -86,11 +86,11 @@ BEGIN AND v.intersection_uid = ANY(target_intersections) --exclude bike exits AND NOT ( - classification_uid = 10 - AND movement_uid = 8 + v.classification_uid = 10 + AND v.movement_uid = 8 ) --exclude bikes in crosswalk - AND NOT (classification_uid = 7) + AND NOT (v.classification_uid = 7) GROUP BY v.intersection_uid, v.classification_uid, @@ -125,4 +125,4 @@ GRANT EXECUTE ON FUNCTION miovision_api.aggregate_volumes_daily(date, date, inte TO miovision_api_bot; REVOKE ALL ON FUNCTION miovision_api.aggregate_volumes_daily(date, date, integer []) -FROM public; \ No newline at end of file +FROM public;