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

10 lines
353 B
SQL

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `bi`.`analisis_ventas_simple`
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`