0
一個最大值對應的數據我有導致查詢:如何獲得在MySQL
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"
我放聲大笑!我不知道我錯過了這個 –