select msg_type, count(msg_type) as count, date_trunc('day', block_timestamp) as DATE
from osmosis.core.fact_msg_attributes
where tx_id in (
select distinct tx_id
from osmosis.core.fact_transactions
where tx_status = 'FAILED'
and block_timestamp > '2022-02-01'
)
and block_timestamp > '2022-02-01'
group by msg_type, DATE