Use hahn;
$week = ($date) -> {
    return DateTime::Format('%Y-%m-%d')(Datetime::MakeDate(DateTime::StartOfWeek(cast($date as Date))))
};
select 
week,
region_round,
sum(costs) as costs
FROM  `home/vipplanners/users/i-anokhin/research/weekly_pack/auto_strategy_costs`
--WHERE region_round <> 'Не Россия'
GROUP BY $week(day) as week, region_round