use hahn;

$user_ids = (
    select distinct user_id
    from `home/webmaster/prod/export/feeds/unisearch/offer_feeds_moderation`
    where `type` == 'education'
        and scc_status_wm == "BANNED"
);

select distinct
    Domain,
    Email,
    "https://webmaster.yandex.ru/site/" || HostId || "/serp-snippets/admin-feeds/" as Link
from `//home/webmaster/prod/analytics/mailings/base`
where UserId in $user_ids
    and HostUrl == MainMirror
    and not IsEuropeanUser
    --and GLOBAL_NOTIFICATION
    --and LanguageRU
