Query backwards Date: record of 365 days before the current date

Query: the current record of 365 days prior to the date

WHERE DATETIME<=DATEADD(DAY,-365,GETDATE())

Guess you like

Origin blog.51cto.com/fishvsfrog/2420972