Soheil_MKUntitled Query
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 token_price as (
select
TIMESTAMP::date as date,
symbol,
TOKEN_CONTRACT,
avg(PRICE_USD) as price
from flow.core.fact_prices
group by 1,2,3
)
select
BLOCK_TIMESTAMP ::date as date,
BLOCKCHAIN,
count(distinct tx_id) as txs,
sum(txs) over (order by date) as cum_txs,
sum(AMOUNT*price) as USD_volume,
sum(USD_volume) over (order by date) as cum_USD_volume,
count(distinct FLOW_WALLET_ADDRESS) as unique_users,
sum(unique_users) over (order by date) as cum_unique_users
from flow.core.ez_bridge_transactions a
join token_price b
on a.TOKEN_CONTRACT=b.TOKEN_CONTRACT and a.BLOCK_TIMESTAMP::date=b.date
where DIRECTION='outbound'
and date >='2022-01-01'
group by 1,2,b.date
Run a query to Download Data