In mssql I would write something like:select sum(case when received_date>=cast(getdate() as date) then 1 else 0 end) as today_count ,sum(case when received_date>=dateadd(hh,12,cast(getdate() as date)) then 1 else 0 end) as today_noon_count ,sum(case when received_date>=cast(getdate() as date) then 0 else 1 end) as three_days_ago_count from yourtable where received_date>=cast(getdate() as date) or (received_date>=dateadd(dd,-3,cast(getdate() as date)) and received_date<dateadd(dd,-2,cast(getdate() as date)) )