feat(db): adjust db/sql/join_srta.sql for vmt-thueringen.de

This commit is contained in:
dancingCycle 2023-08-25 14:05:40 +02:00
parent b6d7e0f314
commit c9e3a17f55
1 changed files with 8 additions and 2 deletions

View File

@ -15,7 +15,7 @@ CREATE INDEX IF NOT EXISTS join_srta_stop_id_idx ON test_gtfs.join_srta(stop_id)
VACUUM ANALYZE;
---Raffael.Rittmeier@rms-consult.de
---@rms-consult.de
SELECT count(*) FROM test_gtfs.join_srta WHERE stop_id LIKE '%de:08111:2420%';
SELECT stop_id, route_id, trip_id, route_short_name, agency_name FROM test_gtfs.join_srta WHERE stop_id LIKE '%de:08111:2420%';
SELECT * FROM test_gtfs.join_srta WHERE stop_id LIKE '%de:08111:2420%' LIMIT 10;
@ -25,7 +25,7 @@ SELECT count(*) FROM test_gtfs.join_srta_s_laihle;
SELECT * FROM test_gtfs.join_srta_s_laihle;
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (SELECT * FROM test_gtfs.join_srta_s_laihle) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/test_gtfs.join.srta_s_laihle.csv
---Metzner, Marco <m.metzner@vrn.de>
---@vrn.de>
SELECT count(*) FROM test_gtfs.join_srta WHERE stop_name LIKE '%Tadano Demag%';
SELECT * FROM test_gtfs.join_srta WHERE stop_name LIKE '%Tadano Demag%' LIMIT 10;
DROP TABLE IF EXISTS test_gtfs.join_srta_zw_tadano_demag;
@ -33,3 +33,9 @@ CREATE TABLE IF NOT EXISTS test_gtfs.join_srta_zw_tadano_demag AS SELECT * FROM
SELECT count(*) FROM test_gtfs.join_srta_zw_tadano_demag;
SELECT * FROM test_gtfs.join_srta_zw_tadano_demag LIMIT 10;
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (SELECT * FROM test_gtfs.join_srta_zw_tadano_demag) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/test_gtfs.join_srta_zw_tadano_demag.csv
---@vmt-thueringen.de
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (SELECT * FROM test_gtfs.join_srta) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/test_gtfs.join_srta.csv
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (select * from (select count(stop_id) as count_id, count(stop_id) filter (where stop_id not like '%:%:%') as count_no_dhid, count(stop_id) filter (where stop_id like '%:%:%') as count_dhid, stop_name from test_analysis.tbl_gtfs_stops_de_th group by stop_name order by count_id) as foo where count_id != count_dhid and count_id != count_no_dhid) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/tbl_gtfs_stops_de_th_mix.csv
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (select * from (select count(stop_id) as count_id, count(stop_id) filter (where stop_id not like '%:%:%') as count_no_dhid, count(stop_id) filter (where stop_id like '%:%:%') as count_dhid, stop_name from test_analysis.tbl_gtfs_stops_de_th group by stop_name order by count_id) as foo where count_id = count_dhid) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/tbl_gtfs_stops_de_th_dhid.csv
---psql -h localhost -p 5432 -U sib00_delfi -d sib00_delfi -c "COPY (select * from (select count(stop_id) as count_id, count(stop_id) filter (where stop_id not like '%:%:%') as count_no_dhid, count(stop_id) filter (where stop_id like '%:%:%') as count_dhid, stop_name from test_analysis.tbl_gtfs_stops_de_th group by stop_name order by count_id) as foo where count_id = count_no_dhid) TO STDOUT WITH CSV HEADER;" -o ~/Downloads/tbl_gtfs_stops_de_th_no_dhid.csv