branch_id bill_amount_total billdate
6 1000 05-06-12
6 1000 06-06-12
7 2000 05-06-12
7 500 06-06-12
8 700 05-06-12
8 800 06-06-12
6 200 05-06-12
7 200 05-06-12
8 200 05-06-12
SELECT branch_id, sum(bill_amount_total) as max_amount,bill_date
FROM pos_master
group by bill_date order by max_amount desc
我所需要的最大纸币金额合计值之和为特定日期总和最大账单金额合计值的日期
首先,使用日期数据类型划分日期。其次,一旦数据集得到纠正,期望的结果集是什么样子? – Strawberry