use hahn;
SELECT
  week,
  CAST(sum(t1.has_metrika_hits) AS Double) / sum(t1.total_hits) AS metrica_share_all,
  CAST(sum(t1.has_metrika_hits) AS Double) / sum(t1.alive_hits) AS metrica_share_live_domain,
  CAST(sum(t1.has_metrika_hits) AS Double) / sum(t1.has_any_hits) AS metrica_share_domains_wt_analsys
  FROM `//home/metrica-analytics/tasks/metr-44270-cover-dashboard/total_data` AS t1
WHERE
  t1.country_aggr IN ('Россия') AND t1.`unreachable_domain` IN (false) AND fielddate >= '2019-11-04T00:00:00.000Z' 
  GROUP BY t1.fielddate AS week