select date_trunc('day', block_timestamp) as date, case
when date >= '2022-05-08' then 'after terra crash'
else 'before terra crash' end as a, attribute_value as proposal_id, count(*)
from osmosis.core.fact_msg_attributes
where date >= current_date - 60 and msg_type = 'proposal_vote' and attribute_key = 'proposal_id'
group by 1, 2, 3