How many hotels have 5 star ratings?
select count(*) from hotels where star_rating_code = "5"
Among the results, how many are hotels that allow pets?
select count(*) from hotels where star_rating_code = "5" and pets_allowed_yn = 1
What one has the highest price range?
select hotel_id from hotels where star_rating_code = "5" and pets_allowed_yn = 1 order by price_range desc limit 1
Please show the average price range of these hotels.
select avg(price_range) from hotels where star_rating_code = "5" and pets_allowed_yn = 1