I was trying to do this:
SELECT COUNT(*),
(
SELECT COUNT(*) FROM attend
WHERE (DATEPART(WEEKDAY,start_date) = 2 OR DATEPART(WEEKDAY,start_date) = 6)
AND empl_no = 12345
)
FROM attend as a
WHERE empl_no = 12345
But this seems a little ugly. Is there a better way to do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…