I would like to get the month names to be in chronological order instead of alphabetically ordered. Here is my Sql code.
select SUM(montant_ht)as Achat ,monthname(dim_date.date) as mois
from operation_odoo
join dim_date on operation_odoo.id_date_facturation = dim_date.id_date
where (operation_odoo.id_type_op=1) and (dim_date.Annee= ? or ? is null )
group by mois
You can order by the month. I would recommend:
As for your query, I would propose: