I need some help with a MySql Query. My existing query returns all rows which have 100001 as the query_id, sorted by priceperadult ASC.
However, I want it to only return the best rate per hotel, so need to add to the statement so only one rate per hotel shows, whats the best way to achieve this?
SELECT * FROM `search_results` WHERE `query_id` = '100001' ORDER BY `priceperadult` ASC
Sample Data
query_id, priceperadult, hotel_name
100001, 100, Hotel 1
100001, 200, Hotel 1
100001, 100, Hotel 2
100001, 200, Hotel 2