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

8 lines
297 B
MySQL
Raw Normal View History

CREATE OR REPLACE DEFINER=`vn-admin`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`ticketLastUpdated`
AS SELECT `ticketLastUpdatedList`.`ticketFk` AS `ticketFk`,
max(`ticketLastUpdatedList`.`created`) AS `lastUpdated`
FROM `vn`.`ticketLastUpdatedList`
GROUP BY `ticketLastUpdatedList`.`ticketFk`