PHP artisan tinker,GROUP BY - 聚合NOT工作但在Management Studio中使用SQL作为Sql Query

I have a query

SQL Query SELECT YEAR(created_At) [YEAR], MONTH(created_at) [MONTH], COUNT(*) as Published_Articles FROM dbo.tasks GROUP BY YEAR(created_At), MONTH(created_at)

Which produces correct result when asked to run in Management Studio

Result

enter image description here

However, when I try to run the same query in laravel tinker, it doesn't run and it says year as an invalid column name but if you look at the query I am using correct alias. Not sure where I am going wrong and why it cannot output the same result as SQL Server Management studio.

tinker not accepting Alias

enter image description here

Can someone please give some direction, I am bit confused