|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
select b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],[Total(Hours)],b.[Current Sub-team],count([Staff ID]) as 人数 from(select b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],a.[Total(Hours)]*1 as [Total(Hours)],b.[Current Sub-eam] from [Current Staff$]b left join [OT Record$]a on a.[Staff NO]=b.[Staff ID] where b.[Staff ID] is not null) group by b.[Staff ID],a.[OT Year],a.[OT Month],a.[OT Date],[Total(Hours)],b.[Current Sub-team]
[ 本帖最后由 抹香鲸2009 于 2010-6-9 20:07 编辑 ] |
|