我正在努力完成这项工作,这个查询应该给出两个日期之间最便宜的价格,但不知何故它总是给出最便宜的报价,它有点忽略日期
SELECT offer_id
FROM travel_offers o
WHERE price = (
SELECT MIN(price) as minprice
FROM travel_offers om
WHERE
o.latitude = om.latitude AND
o.longitude = om.longitude AND
(o.time_from BETWEEN '2012-07-01' AND '2012-11-31')
AND
(o.time_to BETWEEN '2012-07-01' AND '2012-11-31')
)