Table: gw_rail_locomotives
Columns: manufacturer
type
quantity
sht_nos
gwr_nos

Question: How many have SHT number 5?
SQL: SELECT MAX("quantity") FROM gw_rail_locomotives WHERE "sht_nos" = '5'

Question: What GWR is associated with 4?
SQL: SELECT "gwr_nos" FROM gw_rail_locomotives WHERE "quantity" = 4