mohammadhflow 2
Updated 2022-11-14Copy Reference Fork
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
›
⌄
with P as (select
avg(PRICE_USD) as price,
date_trunc('week',TIMESTAMP) as block_week
from flow.core.fact_prices
where SYMBOL = 'FLOW'
group by block_week),
A as (select
date_trunc('week',block_timestamp) as block_week,
count(distinct TX_ID) as tx_count,
count(distinct DELEGATOR) as user_count,
sum(AMOUNT) as sum_amount,
avg(AMOUNT) as avg_amount
from flow.core.ez_staking_actions
where action in ('DelegatorTokensCommitted', 'TokensCommitted')
group by block_week)
select *
from A join P on A.block_week=P.block_week
Run a query to Download Data