MLDZMNFSR5
Updated 2022-12-13Copy 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
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with tbt as (select
timestamp::date as day,
token_contract,
symbol,
avg (price_usd) as token_price
from flow.core.fact_prices
group by 1,2,3),
tb1 as (select
date_trunc('{{Time_basis}}', block_timestamp)::date as date,
sum(AMOUNT*token_price) as volume,
avg(AMOUNT*token_price) as avg_volume
from flow.core.ez_token_transfers s left join tbt a on s.block_timestamp::date=a.day and s.TOKEN_CONTRACT=a.TOKEN_CONTRACT
where block_timestamp >= '2022-01-01'
and TX_SUCCEEDED='TRUE'
group by 1),
tb2 as (select
date_trunc('{{Time_basis}}',date1) as date,
'Flow' as blockchain,
max (count_txn) as TPM_MAX,
min (count_txn) as TPM_MIN,
avg (count_txn) as TPM_Average
from (
select
date_trunc('{{TPM_TPS}}', block_timestamp) as date1,
count(tx_id) as count_txn
from flow.core.fact_transactions
where tx_succeeded = 'TRUE'
and block_timestamp >= '2022-01-01'
group by 1
)
group by 1,2)
Run a query to Download Data