added data_query_order_by function to data.rb