Moe2* sush un - opt
Updated 2022-10-16Copy 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
›
⌄
with base as (select ADDRESS from optimism.core.dim_labels
where
PROJECT_NAME ilike '%sushiswap%'
or
PROJECT_NAME ilike '%uniswap%')
select
date_trunc(day, t.block_timestamp) as days,
PROJECT_NAME,
count(DISTINCT t.tx_hash) as txs,
avg(ETH_VALUE) as avg_amount_per_tx,
avg(avg_amount_per_tx)over(order by days rows between 7 preceding and current row ) as mov_av_7,
avg(avg_amount_per_tx)over(order by days rows between 30 preceding and current row ) as mov_av_30
from optimism.core.fact_event_logs t
left outer join optimism.core.dim_labels l on t.contract_address = l.address
left join optimism.core.fact_transactions r on t.tx_hash = r.tx_hash
where
contract_address in (select address from base)
group by 1,2
Run a query to Download Data