15 lines
437 B
SQL
15 lines
437 B
SQL
CREATE OR REPLACE DEFINER=`root`@`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`
|