mattkstewAave Deposits 2
Updated 2023-06-04Copy Reference Fork
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
›
⌄
with tab1 as (
select
DEPOSITOR_ADDRESS,
count(distinct TX_HASH) as Deposits,
sum(supplied_USd) as Volume_Deposited_USD
from ethereum.aave.ez_deposits
where symbol like 'AAVE'
and block_timestamp > current_date - 365
group by 1
)
select
case
when Deposits = 1 then 'a 1 Deposit'
when Deposits Between 2 and 5 then 'b 2-5 Deposits'
when Deposits Between 6 and 10 then 'c 2-5 Deposits'
when Deposits Between 11 and 20 then 'd 2-5 Deposits'
else 'e > 20 Deposits' End as Deposit_Distribution,
count(*) as Users
from tab1
group by 1
Run a query to Download Data