select distinct EmployeeID,realtimes=count(1),MonthIntTime
(
select left(convert(varchar(100),RealTime,112),6)as MonthIntTime,
left(convert(varchar(90),RealTime,108),5) as realtimes,
EmployeeID=(select distinct EmployeeID from openjson(GroupDetail) with (EmployeeID uniqueidentifier '$.EmployeeID')) from Device_IoTData
) a
join Basic_Employee be on be.id=a.EmployeeID
where a.MonthIntTime=202006 and be.id=a.EmployeeID and a.realtimes>='08:00' and a.realtimes<='16:00'
uj5u.com熱心網友回復:
select distinct EmployeeID,realtimes=count(1),MonthIntTimefrom
(
) a
join .....
uj5u.com熱心網友回復:
1樓說的沒錯,a表外面沒有From轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/14546.html
標籤:疑難問題
