Hello,
I have an chart, whose x axis represents years (text format: "2010", "2011", ect.) and the y axis represents MWh (format number).
When i group by years it adds a comma part to years. How to make it consider the years field as a category ?
SELECT
(
FLOOR(
(
(
`consommation_annuelle_par_commune_demo`.`Année` - 2011.25
) / 1.25
)
) * 1.25
) + 2011.25 AS `Année`,
SUM(
`consommation_annuelle_par_commune_demo`.`Consommation (MWh)`
) AS `sum`
FROM
`consommation_annuelle_par_commune_demo`
GROUP BY
(
FLOOR(
(
(
`consommation_annuelle_par_commune_demo`.`Année` - 2011.25
) / 1.25
)
) * 1.25
) + 2011.25
ORDER BY
(
FLOOR(
(
(
`consommation_annuelle_par_commune_demo`.`Année` - 2011.25
) / 1.25
)
) * 1.25
) + 2011.25 ASC