feat(db): add sh, mv, bb, st, be, nw, he, sn, th, rp, sl, by and bw subset of stops that do not comply with Global ID

This commit is contained in:
dancingCycle 2023-08-22 09:13:28 +02:00
parent 6a9ad33a01
commit a970631eda
1 changed files with 26 additions and 4 deletions

View File

@ -34,16 +34,38 @@ CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_ni AS SELECT stop_id,stop_n
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_hb_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_hb WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_hh_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_hh WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_ni_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_ni WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_sh_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_sh WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_mv_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_mv WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_bb_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_bb WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_st_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_st WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_beops_de_be_not_dhid AS SELECT * FROM :schema.tbl_gtfs_beops_de_be WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_nw_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_nw WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_he_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_he WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_sn_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_sn WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_th_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_th WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_rp_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_rp WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_sl_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_sl WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_by_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_by WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
CREATE OR REPLACE VIEW :schema.vw_gtfs_stops_de_bw_not_dhid AS SELECT * FROM :schema.tbl_gtfs_stops_de_bw WHERE stop_id NOT IN (SELECT dhid FROM :schema_gtfs.stops_zhv) AND stop_id NOT LIKE '%:%:%' ORDER BY stop_id;
---create tables
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_hb_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_hb_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_hh_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_hh_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_ni_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_ni_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_sh_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_sh_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_mv_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_mv_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_bb_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_bb_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_st_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_st_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_beops_de_be_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_beops_de_be_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_nw_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_nw_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_he_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_he_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_sn_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_sn_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_th_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_th_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_rp_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_rp_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_sl_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_sl_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_by_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_by_not_dhid;
CREATE TABLE IF NOT EXISTS :schema.tbl_gtfs_stops_de_bw_not_dhid AS SELECT stop_id,stop_name,stop_lat,stop_lon,the_geom FROM :schema.vw_gtfs_stops_de_bw_not_dhid;