sepehrmhz82023-06-03 10:36 PM
Updated 2023-06-03
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
base as (
select
from_address,
count(DISTINCT (tx_hash)) as Txs,
count(DISTINCT (from_address)) as Users,
sum(amount_usd) as Volume_Usd,
avg(amount_usd) as avg_Volume_Usd,
median(amount_usd) as median_Volume_Usd,
max(amount_usd) as max_Volume_Usd,
min(amount_usd) as min_Volume_Usd
from
ethereum.core.ez_token_transfers
where
TO_ADDRESS = '0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and ORIGIN_TO_ADDRESS = '0x4da27a545c0c5b758a6ba100e3a049001de870f5'
and SYMBOL = 'AAVE'
and block_timestamp::date >= CURRENT_DATE - {{Time_Period}}
group by
1
)
select
count(DISTINCT (from_address)) as Users,
case
when Txs = 1 then 'Once'
when Txs = 2 then '2 Times'
when Txs = 3 then '3 Times'
when Txs = 4 then '4 Times'
when Txs = 5 then '5 Times'
when Txs <= 10 then '10 Times'
when Txs <= 20 then '20Times'
when Txs > 50 then '+50Times'
end as
Type
from
base
Run a query to Download Data