select count(codespace), codespace, tx_code, count(tx_code), msg_type
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 t.block_timestamp > '2022-02-01'
group by codespace, tx_code, msg_type