use jugos_ventas;
SELECT YEAR(A.FECHA_VENTA) AS ANIO, SUM(B.CANTIDAD * B.PRECIO) AS TOTAL_ANIO
FROM facturas A
INNER JOIN items_facturas B ON A.NUMERO = B.NUMERO
GROUP BY YEAR(A.FECHA_VENTA)
ORDER BY ANIO DESC;
use jugos_ventas;
SELECT YEAR(A.FECHA_VENTA) AS ANIO, SUM(B.CANTIDAD * B.PRECIO) AS TOTAL_ANIO
FROM facturas A
INNER JOIN items_facturas B ON A.NUMERO = B.NUMERO
GROUP BY YEAR(A.FECHA_VENTA)
ORDER BY ANIO DESC;
use jugos_ventas;
SELECT YEAR(A.FECHA_VENTA) AS ANIO, SUM(B.CANTIDAD * B.PRECIO) AS TOTAL_ANIO
FROM facturas A
INNER JOIN items_facturas B ON A.NUMERO = B.NUMERO
GROUP BY YEAR(A.FECHA_VENTA)
ORDER BY ANIO DESC;