with votes_raw as (
select fc.tx_hash
,parse_json(fc.args):id as proposal
,parse_json(fc.args):action as vote
,t.tx_receiver as proposer
,t.tx_signer as voter
from near.core.fact_actions_events_function_call fc
join near.core.fact_transactions t
on fc.tx_hash = t.tx_hash
where proposer in ('creatives.sputnik-dao.near') and method_name = 'act_proposal' --and args:id = 13
and deposit = 0
)
select proposer,
voter,
count (distinct tx_hash) as number_of_votes
from votes_raw
group by 1,2
order by 3 desc