Join tables to rebuild query
Update query to filter trip_ids to return matching start/end results
Parse date value for query