Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 14, 2023 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/96585ccf79d77b1be45b411ecf1dc52d to your computer and use it in GitHub Desktop.
Save parzibyte/96585ccf79d77b1be45b411ecf1dc52d to your computer and use it in GitHub Desktop.
SELECT
sum(monto) AS total,
MONTH(fecha) AS mes
FROM
ventas
WHERE
fecha >= "2023-01-01"
AND fecha <= "2023-12-31"
GROUP BY
mes
ORDER BY
mes;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment