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

15 lines
435 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`.`itemShelvingStockRemoved`
AS SELECT `ish`.`id` AS `itemShelvingFk`,
`ish`.`itemFk` AS `itemFk`,
0 AS `removed`
FROM (
(
`vn`.`itemShelving` `ish`
LEFT JOIN `vn`.`itemShelvingSale` `iss` ON(`iss`.`itemShelvingFk` = `ish`.`id`)
)
LEFT JOIN `vn`.`itemShelvingPlacementSupply` `isps` ON(`isps`.`itemShelvingFk` = `ish`.`id`)
)
GROUP BY `ish`.`id`