- Create separate select queries to aggregate the SUM of amount field from the
dbo.[NAV_dbo_Service Line_V] table using the DATEDIFF function
I have to do it in a month to date and year to date separately (that's not the problem once I figure out how to do one I can do the other one) This is what I got so far and of course it shows an error
select
SUM((amount)datediff(YEAR, 1,getdate())from dbo.[NAV_dbo_Service Line_V]
Any help would be very very appreciated
Thank you so much