CREATE or REPLACE VIEW `vBluesealProductDetailList` AS
  SELECT
    `pd`.`id`                       AS `id`,
    `pd`.`slug`                     AS `slug`,
    trim(`pdt`.`name`)              AS `name`
  FROM `ProductDetail` `pd`
  JOIN `ProductDetailTranslation` `pdt` ON `pd`.`id` = `pdt`.`productDetailId`
  JOIN (`ProductSheetActual` AS `psa`
  JOIN `Product` AS `p` ON `p`.`id` = `psa`.`productId` AND `p`.`productVariantId` = `psa`.`productVariantId`
  ) ON `psa`.`productDetailId` = `pd`.`id`
  WHERE
    `pdt`.`langId` = 1 AND `p`.`dummyPicture` is not null AND `p`.`qty` > 0
