mansaGas Fee Analysis
Updated 2022-06-21
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
29
30
31
32
33
34
35
36
›
⌄
with lil as (
select
tx_hash as tx_id
from ethereum.core.fact_event_logs
where lower(contract_address) = lower('0x5d2C31ce16924C2a71D317e5BbFd5ce387854039')
and event_name = 'VoteCast'
),
fees as(
select
date(block_timestamp) as dates,
avg(gas_price) as gas,
sum(gas) over (order by dates) as cum_gas
from ethereum.core.fact_transactions a
inner join lil b
on a.tx_hash = b.tx_id
group by dates
),
proposal_vote as (
select
date(block_timestamp) as vote_day,
sum(event_inputs:votes) as n_votes,
sum(n_votes) over (order by vote_day) as cum_votes
from ethereum.core.fact_event_logs
where lower(contract_address) = lower('0x5d2C31ce16924C2a71D317e5BbFd5ce387854039')
and event_name = 'VoteCast'
group by vote_day
)
select
a.dates,
a.cum_gas,
b.n_votes,
b.cum_votes
from fees a
Run a query to Download Data