maybeyonasalgo_alamex_daily
    Updated 2022-07-07
    with
    dexagg_txs as (
    select
    block_timestamp,
    tx_group_id,
    tx_id,
    asset_id,
    amount as fee,
    tx_sender as user,
    BASE64_DECODE_STRING(tx_message:txn:note) as note,
    parse_JSON(note):volumeUSDC/pow(10,6) as usd_vol,
    parse_JSON(note):groupIds as swap_groups,
    array_size(swap_groups) as swaps
    from algorand.transfers
    where receiver = 'H5T5FHYHVC2GFEZS6YQP27QVNCSMSNXCVMALDONJXFCL3L5NN4BKDMISGA'
    and tx_id != 'MBHLG5YOR36CLAPGDUOYRQVQD3AWUVI4YOGB2CV62BGTCXKUL3ZQ'
    -- and tx_message:txn:note is not null
    and usd_vol is not null
    ),
    alamex_swaps as (
    select
    block_timestamp,
    tx_group_id,
    user,
    fee,
    usd_vol,
    swaps
    from dexagg_txs
    ),
    other_dexs as (
    select
    swap_program,
    block_timestamp,
    tx_group_id,
    swapper
    from algorand.swaps
    Run a query to Download Data