salix/db/routines/vn/views/firstTicketShipped.sql

9 lines
288 B
MySQL
Raw Permalink Normal View History

2024-08-20 08:06:10 +00:00
CREATE OR REPLACE DEFINER=`vn`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`firstTicketShipped`
AS SELECT min(`vn`.`ticket`.`shipped`) AS `shipped`,
`vn`.`ticket`.`clientFk` AS `clientFk`
FROM `vn`.`ticket`
WHERE `vn`.`ticket`.`shipped` > '2001-01-01'
GROUP BY `vn`.`ticket`.`clientFk`