MahrooUntitled Query
Updated 2022-11-20Copy 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
›
⌄
with pricet as (
select timestamp::Date as day,
token,
symbol,
token_contract,
avg (price_usd) as USDPrice
from flow.core.fact_prices
where token != 'Blocto'
group by 1,2,3,4)
select direction,
count (distinct tx_id) as TX_Count,
count (distinct flow_wallet_address) as Wallets_Count,
sum (amount) as Total_Token_Volume,
sum (amount*usdprice) as Total_USD_Volume,
avg (amount) as Average_Token_Volume,
avg (amount*usdprice) as Average_USD_Volume,
median (amount) as Median_Token_Volume,
median (amount*usdprice) as Median_USD_Volume,
min (amount) as Minimum_Token_Volume,
min (amount*usdprice) as Minimum_USD_Volume,
max (amount) as Maximum_Token_Volume,
max (amount*usdprice) as Maximum_USD_Volume
from flow.core.ez_bridge_transactions t1 join pricet t2 on t1.block_timestamp::date = t2.day and t1.token_contract = t2.token_contract
where symbol ilike 'Flow'
group by 1
order by 2 desc
Run a query to Download Data