大葱蘸酱(提问者)select
count(file_name) as file_name,
end_date
from iot_t_kadoudata_knc
where 1=1
and machine_id=5005
and end_date between convert(varchar(100),dateadd(day,-7,getdate()),111)+\' 08:00:00\' and convert(varchar(100),getdate(),111)+\' 19:00:00\'
group by end_date,file_name
添加上了过去7天,然后结果是7天的总和,想要每一天的总和,今天42 昨天58这种结果集,该怎么写呢?谢谢您