MLDZMNsu3
Updated 2022-10-16
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
select
BLOCK_TIMESTAMP::date as day,
'Sushiswap' as DEX,
count(distinct tx_hash) as no_swaps,
count(distinct ORIGIN_FROM_ADDRESS) as no_users,
sum(no_swaps) over (order by day) as cum_swap_count,
sum(no_users) over (order by day) as cum_users_count,
no_swaps/no_users swap_per_user
from Optimism.core.fact_event_logs s left join Optimism.core.dim_labels b on s.CONTRACT_ADDRESS=b.address
where PROJECT_NAME ilike '%sushiswap%'
group by 1
union all
select
BLOCK_TIMESTAMP::date as day,
'Uniswap' as DEX,
count(distinct tx_hash) as no_swaps,
count(distinct ORIGIN_FROM_ADDRESS) as no_users,
sum(no_swaps) over (order by day) as cum_swap_count,
sum(no_users) over (order by day) as cum_users_count,
no_swaps/no_users swap_per_user
from Optimism.core.fact_event_logs s left join Optimism.core.dim_labels b on s.CONTRACT_ADDRESS=b.address
where PROJECT_NAME ilike '%uniswap%'
group by 1
Run a query to Download Data