FatemeTheLady01 Aave 180 days -changes
Updated 2023-03-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
29
30
31
32
33
34
35
36
›
⌄
with tbl1 as
(
select
v.block_timestamp,
v.tx_hash,
v.voter,
t.tx_fee
from
ethereum.aave.ez_votes as v
left join
ethereum.core.fact_transactions as t
on v.tx_hash = t.tx_hash
where
v.block_timestamp::date < current_date
and v.block_timestamp::date >= current_date - 180
order by
1 desc
)
,
tbl2 as
(
select
date_trunc('hour', hour) as hour,
avg(price) as price
from
ethereum.core.fact_hourly_token_prices
where
symbol like 'WETH'
group by
1
)
select
-- date_trunc('day', tbl1.block_timestamp) as "date",
case when date_trunc('day', tbl1.block_timestamp)>=( current_date - 90 ) then 'second 90 days' else 'first 90 days' end as label,
count(distinct tx_hash) as "votes",
count(distinct voter) as "voters",
Run a query to Download Data