zakkisyedCumulative Holders of PEPE
Updated 2023-04-25
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
›
⌄
WITH daily_holders AS (
SELECT
DATE_TRUNC('day', LAST_ACTIVITY_BLOCK_TIMESTAMP) AS date,
COUNT(DISTINCT user_address) AS holder_count
FROM ETHEREUM.core.ez_current_balances
WHERE contract_address = '{{token-contract}}'
and LAST_ACTIVITY_BLOCK_TIMESTAMP >= '2023-04-14'
GROUP BY DATE_TRUNC('day', LAST_ACTIVITY_BLOCK_TIMESTAMP)
),
cumulative_holders AS (
SELECT
date,
SUM(holder_count) OVER (ORDER BY date) AS cumulative_holder_count
FROM daily_holders
),
holder_growth AS (
SELECT
date,
cumulative_holder_count,
LAG(cumulative_holder_count) OVER (ORDER BY date) AS prev_cumulative_holder_count
FROM cumulative_holders
)
SELECT
date,
cumulative_holder_count,
ROUND(
(cumulative_holder_count - prev_cumulative_holder_count) * 100.0 / NULLIF(prev_cumulative_holder_count, 0),
2
) AS day_over_day_change_percentage
FROM holder_growth
ORDER BY date desc;
Run a query to Download Data