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

13 lines
383 B
SQL

CREATE OR REPLACE DEFINER=`vn`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`workerLabour`
AS SELECT `b`.`id` AS `businessFk`,
`b`.`workerFk` AS `workerFk`,
`b`.`workcenterFk` AS `workCenterFk`,
`b`.`started` AS `started`,
`b`.`ended` AS `ended`,
`b`.`departmentFk` AS `departmentFk`,
`b`.`payedHolidays` AS `payedHolidays`
FROM `vn`.`business` `b`
ORDER BY `b`.`started` DESC