SQL 语句优化

指尖上的程序员 指尖上的程序员 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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
...全文
评论 5
收藏 已收藏
分享
返回顶部
指尖上的程序员
MySQL 57,062 成员 56,759 内容