Group Table By Year

Hi all

I have an Invoice model and I want to show a table of profits per year. The column is 'date' and 'profit' so I need to YEAR(date) and SUM(profit). Ive had no end of trouble trying all sorts of methods.

Does anyone know how to do this ?
Was this page helpful?