-
-
Save parzibyte/0b1c8f9ebfd4fd88fa5313cfdd9fac65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
strftime("%m", ordenes.fecha_solicitud) AS mes, | |
coalesce(sum(pagos.monto), 0) AS total_vendido | |
FROM | |
pagos | |
INNER JOIN ordenes ON ordenes.id = pagos.id_orden | |
AND ordenes.fecha_solicitud >= "2023-01-01T00:00:00" | |
AND ordenes.fecha_solicitud <= "2023-12-31T23:59:59" | |
GROUP BY | |
mes | |
ORDER BY | |
mes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment