fixing sql statements in trip.rb