Skip to content

Commit

Permalink
simplify standard_railway_text_stations query
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Dec 16, 2024
1 parent 0087fb1 commit bb3ed10
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions import/sql/tile_views.sql
Original file line number Diff line number Diff line change
Expand Up @@ -187,21 +187,9 @@ CREATE OR REPLACE VIEW standard_railway_text_stations AS
ELSE 50
END AS rank,
count
FROM (
SELECT
id,
osm_id,
center,
railway,
route_count,
station,
railway_ref,
name,
count
FROM stations_with_route_counts
WHERE railway IN ('station', 'halt', 'service_station', 'yard', 'junction', 'spur_junction', 'crossover', 'site', 'tram_stop')
AND name IS NOT NULL
) AS r
FROM stations_with_route_counts
WHERE railway IN ('station', 'halt', 'service_station', 'yard', 'junction', 'spur_junction', 'crossover', 'site', 'tram_stop')
AND name IS NOT NULL
ORDER by rank DESC NULLS LAST, route_count DESC NULLS LAST;

CREATE OR REPLACE VIEW standard_railway_grouped_stations AS
Expand Down

0 comments on commit bb3ed10

Please sign in to comment.