select 用户名称,sum( 用户收入) as 用户收入 from 收入表 where convert(varchar(10),日期\时间,120) between convert(varchar(10),getdate(),120) and (varchar(10),dateadd(day,1,getdate()),120) group by 用户名称
select 用户名称,sum(用户收入) from 收入表 where convert(varchar(10),date,120) = convert(varchar(10),getdate,120)
from 收入表
where convert(varchar(10),日期\时间,120)
between convert(varchar(10),getdate(),120) and (varchar(10),dateadd(day,1,getdate()),120)
group by 用户名称
from 收入表
where convert(varchar(10),date,120) = convert(varchar(10),getdate,120)