USE hahn;

$week = ($date) -> {
    return DateTime::Format("%Y-%m-%d")(DateTime::StartOfWeek(cast($date as Date)))
};


SELECT 
    Week,
    Direct,
    Google,
    Other,
    Facebook,
    Market
FROM `home/vipplanners/weekly_pack/soc_ecom`;