kenobi9270assets
Updated 2022-03-29
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 stable_first as (select swap_from_asset_id as first_swap_from_asset_id,
swap_from_amount as first_swap_from_amount,
swap_to_asset_id as first_swap_to_asset_id,
swap_to_amount as first_swap_to_amount,
swapper as first_swapper,block_timestamp as first_blocktimestamp
from algorand.swaps
where block_timestamp::date >= '2022-01-01'
and (swap_from_asset_id = 31566704
or swap_from_asset_id = 312769)
and (swap_to_asset_id != 31566704
or swap_to_asset_id != 312769)
)
, stable_second as (select swap_from_asset_id as second_swap_from_asset_id,
swap_from_amount as second_swap_from_amount,
swap_to_asset_id as second_swap_to_asset_id,
swap_to_amount as second_swap_to_amount,
swapper as second_swapper,block_timestamp as second_blocktimestamp
from algorand.swaps
where block_timestamp::date >= '2022-01-01'
and (swap_from_asset_id != 31566704
or swap_from_asset_id != 312769)
and (swap_to_asset_id = 31566704
or swap_to_asset_id = 312769)
)
select distinct first_swap_to_asset_id
from stable_first inner join stable_second
on
first_swap_to_asset_id=second_swap_from_asset_id
and
first_swap_to_amount=second_swap_from_amount
and
first_swapper=second_swapper
and
date(first_blocktimestamp)=date(second_blocktimestamp)
and
Run a query to Download Data