我有一个查询 A 导致:
orders | date_added
10 | 2013-01-09
24 | 2013-01-10
13 | 2013-01-11
我想获得相应日期的最大订单数..这是我到目前为止的查询
SELECT MAX( orders )
FROM (
SELECT COUNT( order_id ) AS orders, DATE( date_added ) FROM `order`
WHERE YEAR(date_added) = YEAR( NOW( ) )
GROUP BY DATE( date_added )
) AS daily_orders"