SocioCryptoTop 100 users in terms of tx_fee paid
Updated 2023-04-20
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
›
⌄
-- forked from Top 100 users in terms of n_txns @ https://flipsidecrypto.xyz/edit/queries/d42f1153-a9b9-43a6-8cea-8e210cfdd1d6
-- forked from Top users in terms of n_txns @ https://flipsidecrypto.xyz/edit/queries/70ca453f-3222-4918-afbd-2fa1b13e0e38
with first_received as (
SELECT *
from(
SELECT to_address as user,
project_name as CEX,
tx_hash,
rank()over(partition by to_address order by block_timestamp) as rank
FROM
(
SELECT
project_name,
to_address,
tx_hash,
block_timestamp
FROM avalanche.core.ez_token_transfers a
LEFT JOIN avalanche.core.dim_labels b
on a.from_address = b.address
WHERE b.label_type = 'cex'
UNION
SELECT
project_name,
eth_to_address,
tx_hash,
block_timestamp
FROM avalanche.core.ez_avax_transfers a
LEFT JOIN avalanche.core.dim_labels b
on a.eth_from_address = b.address
WHERE b.label_type = 'cex'
)
)
where rank = 1
),
Run a query to Download Data