use arnold;

-- На основе таблиц visit-v2-log 
--   arnold://logs/visit-v2-log/1d
--   arnold://logs/visit-v2-private-log/1d
--   arnold://home/webmaster/prod/searchqueries/user_sessions/reference/metrika (CM:user_sessions_parser_daily)
--   arnold://home/webmaster/prod/siteservices/services (CM:siteservices_metrika_hosts)

insert into `//home/webmaster/prod/analytics/metrika/use_metrika`
    with truncate
select 
    MascotOwner as MetrikaDomain,
from `//home/webmaster/prod/siteservices/services`
where UseMetrika
order by MetrikaDomain
