select
sum(split(ATTRIBUTE_VALUE::string,'ibc')[0]/1e6) as amount, block_timestamp::date as date,
case
when DAYNAME(block_timestamp::date)='Fri' then 'friday'
else 'otherdays' end as dayname
from osmosis.core.fact_msg_attributes where msg_type='token_swapped'
and ATTRIBUTE_VALUE like '%987C17B11ABC2B20019178ACE62929FE9840202CE79498E29FE8E5CB02B7C0A4'
and date >= '2022-03-20'
group by date