Fixed sql statement for departures.