---the first day of the current weekSelectCONVERT (varchar ( -), DATEADD (day,-(DATEPART (Weekday,getdate ())-1), GETDATE ()), at) as'Monday', CONVERT (varchar ( -), DATEADD (day,-(DATEPART (Weekday,getdate ())-7), GETDATE ()), at) as'Sunday',--this month, convert (varchar ( -), DateAdd (Dd,-day (getdate ()) +1, GETDATE ()), at) as'first day of the month', CONVERT (varchar ( -), DateAdd (ms,-3, DATEADD (mm, DATEDIFF (M,0, GETDATE ()) +1,0)), at) as 'last day of the month', CONVERT (int, CONVERT (varchar (Ten), DATEADD (m,-2, DateAdd (Dd,-day (getdate ()) +1, GETDATE ())), the)) as'first three months',--last three months convert (varchar ( -), DateAdd (ms,-3, DATEADD (mm, DATEDIFF (M,0, GETDATE ()) +1,0)), at) as 'last day of the month'
SQL Server asks the first and last day of the current week, the first day of the current month, and the last day, the first day of the previous three months, and today