binhachonUntitled Query
    with tx_group_id as (
    select
    distinct
    sender as sender_0,
    tx_group_id as tx_group_id_0
    from algorand.payment_transaction
    where receiver = 'XNFT36FUCFRR6CK675FW4BEBCCCOJ4HOSMGCN6J2W6ZMB34KM2ENTNQCP4'
    and amount > 0
    ),
    stats as (
    select
    block_timestamp,
    tx_group_id,
    sum(amount) as price
    from algorand.payment_transaction
    inner join tx_group_id on (tx_group_id = tx_group_id_0)
    group by 1, 2
    ),
    ALGO_swaps as (
    select
    block_timestamp,
    swap_from_amount as algo_amount,
    swap_to_amount as usdc_amount
    from algorand.swaps
    where swap_from_asset_id = 0
    and swap_to_asset_id in (31566704, 312769)
    and swap_from_amount > 0
    and swap_to_amount > 0
    union all
    select
    block_timestamp,
    swap_to_amount as algo_amount,
    swap_from_amount as usdc_amount
    from algorand.swaps
    where swap_from_asset_id in (31566704, 312769)
    and swap_to_asset_id = 0
    Run a query to Download Data