MySQL returned an empty result
Your problem is with where condition.

Do have a look at mysql date/datetime formats, this will give you clear idea of how you should use date functions in mysql.

If you need data of previous year, simply change your where condition to:
YEAR(product.created_at) &lt; YEAR(NOW())

Hope this helps!