SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT MONTH(BirthDate), COUNT(*) AS Именинники CASE WHEN DATEDIFF(MONTH, BirthDate, GETDATE()) >= MONTH(BirthDate) IN(10,11,12) then 'YES' ELSE 'No' END AS TIME FROM Employees GROUP BY MONTH(BirthDate) ORDER BY MONTH(BirthDate)

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear