MLDZMNDaily swap volume
Updated 2022-12-05
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
32
33
34
35
36
›
⌄
with times as (with tb1 as (SELECT
SYMBOL_IN as coins
from ethereum.sushi.ez_swaps
union ALL
SELECT
SYMBOL_OUT as coins
from ethereum.sushi.ez_swaps)
select
distinct SYMBOL,
TOKEN_ADDRESS,
avg(price)as aag
from flipside_prod_db.ethereum_core.fact_hourly_token_prices
where SYMBOL in (select coins from tb1)
group by 1,2 having aag between 0.99 and 1.01),
tb1 as(SELECT
BLOCK_TIMESTAMP::date as day,
SYMBOL_IN as coins,
sum(AMOUNT_IN_USD) as volume_in
from ethereum.sushi.ez_swaps
where SYMBOL_IN in (select SYMBOL from times)
and BLOCK_TIMESTAMP>=CURRENT_DATE-90
group by 1,2
),
tb2 as(SELECT
BLOCK_TIMESTAMP::date as day,
SYMBOL_OUT as coins,
sum(AMOUNT_OUT_USD) as volume_out
from ethereum.sushi.ez_swaps
where SYMBOL_OUT in (select SYMBOL from times)
Run a query to Download Data