SyntaxFix
Write A Post
Hire A Developer
Questions
If you are comparing between dates, extract the full date for comparison. If you are comparing the years and months only, use
SELECT YEAR(date) AS 'year', MONTH(date) AS 'month' FROM Table Where Condition = 'Condition';