salix/db/routines/vn2008/views/ticketCreationData.sql

10 lines
335 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`ticketCreationData`
AS SELECT dayname(`h`.`confirm_date`) AS `DiadelaSemana`,
HOUR(`h`.`confirm_date`) AS `Hora`,
cast(`h`.`confirm_date` AS date) AS `Fecha`,
`h`.`source_app` AS `Dispositivo`
FROM `hedera`.`order` `h`
WHERE `h`.`confirm_date` <> 0