select b.hotel_id,b.hotel_name,count(distinct a.orderid) as order_sum
from
ctrip_hotel_order a
inner join ctrip_hotel_info b
on a.hotel_id=b.hotel_id
group by 1,2
order by order_sum desc,b.hotel_id asc
limit 2