Alexayopt daily
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
›
⌄
select date_trunc('day',block_timestamp) as day, count(distinct tx_hash) as swaps, count(distinct origin_from_address) as users,
case when (origin_to_address='0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6' or origin_to_address='0x40e223295f6f216feede416d6b9e198368ed663a' or origin_to_address='0x35f048853b59400fbec80748592904f66374cfc0' or origin_to_address='0xe52180815c81d7711b83412e53259bed6a3ab70a')
then 'SushiSwap'
when (origin_to_address='0xe592427a0aece92de3edee1f18e0157c05861564' or origin_to_address='0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45')
then 'Uniswap'
end as platform
from optimism.core.fact_event_logs
where (origin_to_address='0xe592427a0aece92de3edee1f18e0157c05861564' -- Uniswap V3: Router
or origin_to_address='0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45' -- Uniswap V3: Router 2
or origin_to_address='0xbe811a0d44e2553d25d11cb8dc0d3f0d0e6430e6' --sushiswap1
or origin_to_address='0x40e223295f6f216feede416d6b9e198368ed663a' --sushiswap2
or origin_to_address='0x35f048853b59400fbec80748592904f66374cfc0' --sushiswap3
or origin_to_address='0xe52180815c81d7711b83412e53259bed6a3ab70a') --sushiswap4
and tx_status='SUCCESS'
--and day>='2022-05-01'
group by day, platform
order by day
Run a query to Download Data