CREATE TABLE weekly_weather (station_id INT, day_of_week TEXT, high_temperature INT, low_temperature INT, precipitation FLOAT, wind_speed_mph INT)
CREATE TABLE train (id INT, train_number INT, name TEXT, origin TEXT, destination TEXT, time TEXT, interval TEXT)
CREATE TABLE station (id INT, network_name TEXT, services TEXT, local_authority TEXT)
CREATE TABLE route (train_id INT, station_id INT)

Find names of trains that run through stations for the local authority Chiltern, compare the total number of name in a bar graph, and sort in asc by the y-axis.
SELECT name, COUNT(name) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY name ORDER BY COUNT(name)
SELECT "name", COUNT("name") FROM "station" AS "t1" JOIN "route" AS "t2" ON "t1"."id" = "t2"."station_id" JOIN "train" AS "t3" ON "t2"."train_id" = "t3"."id" WHERE "Chiltern" = "t1"."local_authority" GROUP BY "name" ORDER BY COUNT("name") NULLS FIRST