adambalaVoting Activity
Updated 2022-06-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
›
⌄
select
ID_propal,vote,count(distinct ORIGIN_FROM_ADDRESS) as wallets,datee ,av_gas
from (
with gas
as
(select
date_trunc('day', block_timestamp) as datee,
avg(gas_price)/1e9 as av_gas
from ethereum.transactions
where block_timestamp >=getdate() - interval '300 days'
group by 1 having av_gas <500
order by 1)
select EVENT_INPUTS:proposalId as ID_propal ,
count(distinct EVENT_INPUTS:votes) as vote ,
ORIGIN_FROM_ADDRESS ,
datee ,av_gas
from ethereum.core.fact_event_logs lg inner join gas
on block_timestamp::date =datee
where EVENT_NAME='VoteCast'
and CONTRACT_ADDRESS=('0x5d2c31ce16924c2a71d317e5bbfd5ce387854039' ) group by 1,3,4,5 having vote between 1 and 3 )
where vote between 0 and 3
group by 1,2,4,5
Run a query to Download Data