I want to get total counts from SuperScottTable1
from the previous day and narrow to a time frame (From-To). The below works fine until I add
AND (time > '08:00:00.000' AND time < '22:00:00.000')
It does not error, just returns null.
Is this possible to do?
SELECT
SUM(COALESCE(confirmedCount, 0))
FROM
SuperScottTable1
WHERE
superLaneID = '90099'
AND time >= GETDATE()-1
AND (time > '08:00:00.000' AND time < '22:00:00.000')