有一个单位,计算员工的工作绩效,如当前为12月,员工的入职月为10月,那么用SQL查询语句怎么统计10-12月这3个月的工作量,听说有个函数,麻烦高手举例介绍一下,谢谢请提供 表结构+测试数据+结果 . SQL code: select convert(varchar(7),time,120),sum(工作量) from tb group by convert(varchar(7),time,120)
select * from tb where dt < getdate()
select id , sum(val) from tb where dt < getdate() group by id 你的工作量和绩效是怎么考核的?天数和工作量的关系定义是什么? 顶一下