salix/db/routines/bi/views/analisis_grafico_ventas.sql

10 lines
354 B
MySQL
Raw Permalink Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `bi`.`analisis_grafico_ventas`
AS SELECT `bi`.`analisis_ventas`.`Año` AS `Año`,
`bi`.`analisis_ventas`.`Semana` AS `Semana`,
sum(`bi`.`analisis_ventas`.`Importe`) AS `Importe`
FROM `bi`.`analisis_ventas`
GROUP BY `bi`.`analisis_ventas`.`Año`,
`bi`.`analisis_ventas`.`Semana`