in fetchMysql/report_pricing_v1.php add the functionality to section Per-Hotel Occupancy from properties_order get the position in the search listing, again for query_date one day before it got booked, if we have such a record in the database. properties_order is being usuialy fetched acoupleof times per day while room_details only one time/day. Try to find the closest match before the booking was done, so we understand that while on pos 5 the apartment got booked. If not 100% clear pls ask