freemartianFuel - Deposit Distribution
Updated 2024-10-18
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
›
⌄
with deposits AS (
SELECT
block_timestamp, tx_hash, from_address, amount_usd, 'ETH' AS symbol
FROM ethereum.core.ez_native_transfers
WHERE to_address = '0x19b5cc75846bf6286d599ec116536a333c4c2c14'
AND origin_function_signature = '0xdf68e9d6'
AND block_timestamp::date >= '2024-07-08'
UNION
SELECT
block_timestamp, tx_hash, from_address, amount_usd, symbol
FROM ethereum.core.ez_token_transfers
WHERE to_address = '0x19b5cc75846bf6286d599ec116536a333c4c2c14'
AND origin_function_signature = '0xdf68e9d6'
AND block_timestamp::date >= '2024-07-08'
),
final AS (
SELECT
from_address,
SUM(amount_usd) AS usd_amount
FROM deposits
WHERE amount_usd IS NOT NULL
GROUP BY 1
)
SELECT
(CASE
WHEN usd_amount < 500 THEN 'Less than $500'
WHEN usd_amount >= 500 AND usd_amount < 1000 THEN 'Between $500 and 1k'
WHEN usd_amount >= 1000 AND usd_amount < 5000 THEN 'Between 1K and 5K'
WHEN usd_amount >= 5000 AND usd_amount < 10000 THEN 'Between 5K and 10K'
WHEN usd_amount >= 10000 AND usd_amount < 50000 THEN 'Between 10K and 50K'
WHEN usd_amount >= 50000 THEN 'More Than 50K'
END
) AS label,
count(*) AS users,
SUM(usd_amount) AS amount
Auto-refreshes every 1 hour
QueryRunArchived: QueryRun has been archived