CREATE OR REPLACE VIEW vBluesealNewsletterEmailList AS
  SELECT
    `nl`.`id`               AS id,
    `nl`.`email`            AS `email`,
    `ud`.`name`             AS `name`,
    `ud`.`surname`          AS `surname`,
    `nl`.`isActive`         AS `isActive`,
    `nl`.`subscriptionDate` AS `subscriptionDate`,
    `nl`.`unsubscriptionDate`
  FROM Newsletter AS nl LEFT JOIN User AS us ON `nl`.`email` = `us`.`email`
    LEFT JOIN `UserEmail` AS `ue` ON `nl`.`email` = `ue`.`address`
    LEFT JOIN `UserDetails` AS `ud` ON `us`.`id` = `ud`.`userId`
  WHERE 1 = 1
  GROUP BY `nl`.`email`;