vendettaChanges in the number of holders and price fluctuations as a percentage
Updated 2024-10-29
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
MonthlyPriceData as (
select
date_trunc('month', hour) as month,
avg(price) as monthly_price
from base.price.ez_prices_hourly
where token_address = '0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938'
group by month
),
MonthlyHolderData as (
select
date_trunc('month', block_timestamp) as month,
count(distinct from_address) as monthly_holders
from base.core.ez_token_transfers
where contract_address = '0x04d5ddf5f3a8939889f11e97f8c4bb48317f1938'
group by month
),
PriceChangePercentage as (
select
month,
monthly_price,
(monthly_price - lag(monthly_price) over(order by month)) / lag(monthly_price) over(order by month) * 100 as price_change_pct
from MonthlyPriceData
),
HolderChangePercentage as (
select
month,
monthly_holders,
(monthly_holders - lag(monthly_holders) over(order by month)) / lag(monthly_holders) over(order by month) * 100 as holder_change_pct
from MonthlyHolderData
)
select
PriceChangePercentage.month,
PriceChangePercentage.price_change_pct,
HolderChangePercentage.holder_change_pct
QueryRunArchived: QueryRun has been archived