mucryptoUntitled Query
Updated 2023-02-18
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
28
29
30
31
›
⌄
with dex as (
select
date_trunc('day', block_timestamp) as date,
pool_name,
token_in,
token_out,
symbol_in,
symbol_out
from
ethereum.core.ez_dex_swaps
where block_timestamp::date between '2022-05-04' and '2022-05-15'
),
pairs as (
select
date,
pool_name,
case
when symbol_in = 'USDC' and symbol_out = 'WETH' then 'USDC-WETH'
else 'Other'
end as pair_symbol
from dex
)
select
date,
count(pair_symbol) as n_of_swaps,
pair_symbol
from pairs
group by 1,3
order by 1
Run a query to Download Data