select 名称,规格,单价,日期,count(总量) from table
group by 名称,规格,单价,日期