我试图从两张桌子下面显示价格低廉的不同酒店房间(低价房间的酒店,无需显示该酒店的其他房间)。但我收到错误“on 子句中的未知列 column_name”。请检查我的查询
SELECT r.*,h.*
FROM hotels_temp h,rooms_temp r
INNER JOIN
(
SELECT
hotel_code,MIN(amount) mincost
FROM
rooms_temp
GROUP BY hotel_code
) m ON r.amount = m.mincost and h.hotel_code=r.hotel_code
ORDER BY r.amount
LIMIT 30
表名: hotels_temp
表名:rooms_temp