banbannardUntitled Query
Updated 2022-07-04Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
›
⌄
select date_trunc('day', block_timestamp) as day,
bridge,
split(token_contract, '.')[2] as token,
ifnull(avg(price_usd), 0) as token_price,
sum(amount) as token_amount
from flow.core.fact_bridge_transactions a
left join flow.core.fact_prices b
on date_trunc('day', a.block_timestamp) = date_trunc('day', b.timestamp) and split(token_contract, '.')[2] = b.token
group by 1,2,3
--where token_contract ilike '%ce%'
Run a query to Download Data