This is probably a better way to do it, since it would allow the query optimizer to use an index on column exdate, and it will use less CPU because you don't have to use the MONTH or YEAR function on column exdate from each row:select ExDate, LICTYPEfrom dbo.vwExpiredRegTotal2where DIVISIONCD = 'neweng' and exdate >= dateadd(yy,datediff(yy,0,getdate()),0) and exdate < dateadd(yy,datediff(yy,0,getdate())+1,0)
CODO ERGO SUM