KaskoazulArbitrage buena
Updated 2022-03-27
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 FIRST_TX AS (
SELECT
firstswap.swapper,
firstswap.block_timestamp as fecha_1,
firstswap.tx_group_id as tx_1,
firstswap.swap_from_asset_id,
firstswap.swap_from_amount,
firstswap.swap_to_asset_id,
firstswap.swap_to_amount,
firstswap.swap_program,
(
SELECT
MIN(secondswap.block_timestamp)
FROM algorand.swaps AS secondswap
WHERE secondswap.block_timestamp > firstswap.block_timestamp
AND firstswap.swapper = secondswap.swapper
AND firstswap.swap_to_asset_id = secondswap.swap_from_asset_id
AND firstswap.swap_to_amount = secondswap.swap_from_amount
AND secondswap.swap_to_asset_id IN (31566704, 312769)
) AS NextDate
FROM algorand.swaps as firstswap
WHERE firstswap.swap_from_asset_id IN (31566704, 312769)
AND fecha_1 >= '2022-01-01'
LIMIT 10
)
SECOND_TX as (
)
select swapper,
Run a query to Download Data