freemartianAll Users
Updated 2024-09-01
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
›
⌄
-- Debank L2: 0x63ca00232f471be2a3bf3c4e95bc1d2b3ea5db92
with inflow AS (
SELECT
transfer.block_timestamp,
transfer.tx_hash,
transfer.from_address,
transfer.amount,
transfer.amount_usd,
tx_fee
FROM ethereum.core.ez_native_transfers transfer
INNER JOIN ethereum.core.fact_transactions transaction ON(transaction.tx_hash = transfer.tx_hash)
WHERE transfer.to_address = '0x63ca00232f471be2a3bf3c4e95bc1d2b3ea5db92'
AND transfer.block_timestamp:: date >= '2024-07-12'
AND transaction.block_timestamp:: date >= '2024-07-12'
AND amount_usd IS NOT NULL
)
SELECT
from_address AS user,
SUM(amount) AS eth_amount,
SUM(amount_usd) AS usd_amount,
COUNT(tx_hash) AS transactions,
(CASE
WHEN RANK() OVER(ORDER BY usd_amount DESC) = 1 THEN '🥇'
WHEN RANK() OVER(ORDER BY usd_amount DESC) = 2 THEN '🥈'
WHEN RANK() OVER(ORDER BY usd_amount DESC) = 3 THEN '🥉'
ELSE to_char(RANK() OVER(ORDER BY usd_amount DESC))
END) AS rank
FROM inflow
GROUP BY 1
ORDER BY usd_amount DESC
Auto-refreshes every 1 hour
QueryRunArchived: QueryRun has been archived