Company: ZS Associates BTSA
Difficulty: medium
Find Specific Trains to Pune A railway database stores its trains, train types and stations in three tables. Write an SQL query to find every train that satisfies both of these conditions: the train's name starts with the letter M , and the train's destination (the station it goes to ) is the station named Pune . Return the train_id and train_name of these trains, sorted by train_id in ascending order. Table: train_details_tbl Column Type Description train_id INT Primary key; unique id of the train train_name VARCHAR(50) Name of the train (two different trains may have the same name) train_type VARCHAR(5) Foreign key to train_type_tbl.train_type train_time VARCHAR(4) Departure time as HHMM train_from VARCHAR(5) Foreign key to train_stations_tbl.station_id : the station the train departs from train_to VARCHAR(5) Foreign key to train_stations_tbl.station_id : the station the train goes to (its destination) train_speed INT Average speed in km/h Table: train_type_tbl Column Type Descriptio