select count(codespace), codespace, date_trunc('week', t.block_timestamp) as DATE
from osmosis.core.fact_transactions t
inner join osmosis.core.fact_msg_attributes m on t.tx_id = m.tx_id
where tx_status = 'FAILED'
and msg_type = 'tx'
and t.block_timestamp > '2022-02-01'
group by codespace, DATE