Crazzy_SidETH: Total Number of Addresses by Balance
Updated 2024-10-15
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
›
⌄
WITH DailyBalances AS (
SELECT
USER_ADDRESS AS Address,
current_bal_usd,
symbol
FROM
ethereum.core.ez_balance_deltas
WHERE
BLOCK_TIMESTAMP >= CURRENT_DATE - INTERVAL '30 days'
)
SELECT
COUNT(DISTINCT CASE WHEN current_bal_usd = 0 THEN Address END) AS ZERO_BALANCE,
COUNT(DISTINCT CASE WHEN current_bal_usd > 0 AND current_bal_usd < 1 THEN Address END) AS BALANCE_0_TO_1,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 1 AND current_bal_usd < 10 THEN Address END) AS BALANCE_1_TO_10,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 10 AND current_bal_usd < 100 THEN Address END) AS BALANCE_10_TO_100,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 100 AND current_bal_usd < 1000 THEN Address END) AS BALANCE_100_TO_1K,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 1000 AND current_bal_usd < 10000 THEN Address END) AS BALANCE_1K_TO_10K,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 10000 AND current_bal_usd < 100000 THEN Address END) AS BALANCE_10K_TO_100K,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 100000 AND current_bal_usd < 1000000 THEN Address END) AS BALANCE_100K_TO_1M,
COUNT(DISTINCT CASE WHEN current_bal_usd >= 1000000 THEN Address END) AS BALANCE_1M_OR_MORE
FROM
DailyBalances
WHERE
symbol = 'ETH';