KaskoazulArbitrage CTE
    with FIRSTSWAP as (
    select swapper,
    tx_group_id,
    block_timestamp::date as fecha,
    swap_from_asset_id,
    swap_from_amount,
    swap_to_asset_id,
    swap_to_amount,
    swap_program
    from algorand.swaps
    where swap_from_asset_id IN (31566704, 312769)
    and fecha >= '2022-01-01'
    ),

    SECONDSWAP as (
    select swapper,
    tx_group_id,
    block_timestamp::date as fecha,
    swap_from_asset_id,
    swap_from_amount,
    swap_to_asset_id,
    swap_to_amount,
    swap_program
    from algorand.swaps
    where swap_to_asset_id IN (31566704, 312769)
    and fecha > FIRSTSWAP.fecha
    and swap_from_asset_id = FIRSTSWAP.swap_to_asset_id
    and swap_from_amount = FIRSTSWAP.swap_to_amount
    )


    SELECT * FROM SECONDSWAP
    LIMIT 10