Created
January 15, 2018 12:57
-
-
Save asterion/8a9d5e90aec80e37c7e3110efb48ae77 to your computer and use it in GitHub Desktop.
sql group by
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 facturas.id, SUM(detalle.cantidad*detalle.valor) FROM facturas, detalle WHERE facturas.id = detalle.factura_id GROUP BY facturas.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment