MLDZMNuni2
Updated 2023-05-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 tb1 as(SELECT
*
from ethereum.core.dim_labels
where label_type='cex'
),
tb2 as(SELECT
*
from ethereum.core.dim_labels
where label_type='dex'
),
t1 as (select
date_trunc('week',BLOCK_TIMESTAMP) as date,
count(distinct tx_hash) as no_transfer,
count(distinct Origin_FROM_ADDRESS) as no_sender,
sum(amount) as Uni_volume,
sum(AMOUNT_USD) as total_volume,
avg(AMOUNT_USD) as avg_volume,
median(AMOUNT_USD) as median_volume,
sum(total_volume) over (order by date) as cum_volume
from ethereum.core.ez_token_transfers
where TO_address in (select ADDRESS from tb1)
and FROM_ADDRESS in (select ADDRESS from tb2)
and SYMBOL = 'UNI'
and BLOCK_TIMESTAMP>= '{{Start_date}}'
group by 1
),
t2 as (
select
date_trunc('week',BLOCK_TIMESTAMP) as date,
count(distinct tx_hash) as no_transfer,
count(distinct Origin_FROM_ADDRESS) as no_sender,
sum(amount) as Uni_volume,
sum(AMOUNT_USD) as total_volume,
Run a query to Download Data