saeedmzn[Jumbo exchange] - Total
Updated 2024-12-08
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 min_max_swap_indexes as (
select tx_hash,
min (swap_index) min_index,
max(swap_index) max_index
from near.defi.ez_dex_swaps
where BLOCK_TIMESTAMP::date >= '2024-01-01'
and platform = 'v1.jumbo_exchange.near'
group by 1
),
swapped_in as (
select
block_timestamp::date date ,
tx_hash,
trader ,
symbol_out token_in ,
amount_out amount_in ,
iff(zeroifnull(amount_out_usd) >1e6,0,amount_out_usd) AMOUNT_IN_USD
from near.defi.ez_dex_swaps left join min_max_swap_indexes using(tx_hash)
where BLOCK_TIMESTAMP::date >= '2024-01-01'
and platform = 'v1.jumbo_exchange.near'
and swap_index = min_index
and min_index <> max_index
),
swapped_out as (
select
tx_hash,
symbol_in token_out ,
amount_in amount_out ,
zeroifnull(amount_in_usd) amount_out_usd
from near.defi.ez_dex_swaps left join min_max_swap_indexes using(tx_hash)
where BLOCK_TIMESTAMP::date >= '2024-01-01'
and platform in ('v2.ref-finance.near','ref-finance.near')
and swap_index = max_index
and min_index <> max_index
),
QueryRunArchived: QueryRun has been archived