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`