freemartianDebank - distribution
Updated 2024-07-23
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
›
⌄
-- 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
(CASE
WHEN amount_usd < 50 THEN 'Less Than $50'
WHEN amount_usd >= 50 AND amount_usd < 100 THEN 'Between $50 & $100'
WHEN amount_usd >= 100 AND amount_usd < 250 THEN 'Between $100 & $250'
WHEN amount_usd >= 250 AND amount_usd < 500 THEN 'Between $250 & $500'
WHEN amount_usd >= 500 AND amount_usd < 1000 THEN 'Between $500 & $1000'
WHEN amount_usd >= 1000 AND amount_usd < 2000 THEN 'Between $1000 & $2000'
WHEN amount_usd >= 2000 THEN 'More Than $2000'
END ) AS label,
count(DISTINCT from_address) AS user,
SUM(amount) AS eth_amount,
SUM(amount_usd) AS usd_amount
FROM inflow
GROUP BY 1
Auto-refreshes every 1 hour
QueryRunArchived: QueryRun has been archived