SocioCryptoDeFi
Updated 2022-06-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT date_Trunc('month', block_timestamp) as date,
label,
count(DISTINCT from_address) as n_addreses
from
(
SELECT b.label, from_address, block_timestamp,
rank()OVER(partition by to_Address order by block_timestamp) as rank
FROM ethereum.core.ez_token_transfers a
LEFT JOIN ethereum.core.dim_labels b
ON a.to_address = b.address
LEFT JOIN ethereum.core.dim_labels c
ON a.from_address = c.address
WHERE symbol = 'SUSHI'
AND c.label is null
AND b.label_type = 'defi'
qualify rank = 1
)
group
by date, label
Run a query to Download Data