Q&A for Drupal developers and administrators
SELECT CAST(DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-2, -1)AS DATE), CAST(DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, -1)AS DATE), CAST(DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1, 0)AS DATE)