SQL 语句优化
SELECT h.HotelId,h.hotelName ,h.hotelEnglishName,h.country,h.city,h.tow,h.Location,h.salableState,h.StarLevel,h.ProductLabel,h.HotelType,
ext.Address,ext.Rating,ext.Parking,ext.SwimmingPool,ext.Restaurant,ext.OtherFacility,ext.PickupService,ext.ForeignExchange,ext.NetworkService,
ext.OtherService,ext.AcceptCreditCard,ext.OtherPolicy,image.path as imgPath,MIN(p.Price) as Price FROM sz_hotel as h LEFT JOIN sz_exthotel as ext ON (ext.HotelId=h.HotelId)
LEFT JOIN sz_roomtype as r ON (r.HotelId=h.HotelId) LEFT JOIN sz_hotelpicture as image ON (image.HotelId=h.HotelId)
LEFT JOIN sz_DateRoomPriceInfo as p ON ( p.RoomId=r.RoomTypeId AND p.Price <>0 AND p.Price IS NOT NULL) group by h.HotelId