4
Hello, I have a table with date field, I want to group by semester/year, I did so.
SELECT
SUM(quantidade) quantidade,
YEAR(DATA) ano
FROM
tbmanipulacao
GROUP BY
YEAR(DATA),
MONTH(DATA) <=6,
MONTH(DATA) >6
ORDER BY
ano
ASC
the question is, how to identify the semester ? (know that that amount belongs to the 1st or 2nd semester).