Skip to content

Commit

Permalink
#868, #879 change gwolofs reference to miovision
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielwol committed Jul 31, 2024
1 parent ee8f3b2 commit ec983a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions volumes/miovision/sql/table/create-table-movement_map_new.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DROP TABLE gwolofs.miovision_movement_map_new;
CREATE TABLE gwolofs.miovision_movement_map_new AS (
DROP TABLE miovision_api.miovision_movement_map_new;
CREATE TABLE miovision_api.miovision_movement_map_new AS (
SELECT
entries.movement_uid,
entries.leg_old AS leg,
Expand All @@ -17,8 +17,8 @@ CREATE TABLE gwolofs.miovision_movement_map_new AS (
WHERE entries.leg_new <> substr(entries.dir, 1, 1) --eg. E leg going West is an entry
);

ALTER TABLE gwolofs.miovision_movement_map_new
ALTER TABLE miovision_api.miovision_movement_map_new
ADD CONSTRAINT movement_map_new_pkey PRIMARY KEY (movement_uid, leg);

COMMENT ON TABLE gwolofs.miovision_movement_map_new
COMMENT ON TABLE miovision_api.miovision_movement_map_new
IS 'A more intuitive version of miovision_api.movement_map.';
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CREATE VIEW miovision_api.volumes_15min_atr_filtered AS (
v15.classification_uid,
mmm.exit_leg,
mmm.exit_dir,
SUM(v15.volume)
SUM(v15.volume) AS volume
FROM miovision_api.volumes_15min_mvt_filtered AS v15
JOIN miovision_api.miovision_movement_map_new AS mmm USING (movement_uid, leg)
GROUP BY
Expand Down

0 comments on commit ec983a9

Please sign in to comment.