select date between today and 12 months back code example Example: sql where last 12 months select Dateadd(Month, -12, GETDATE())