binhachonHumble Yield Farm - #3
    Updated 2022-07-07
    with swap_tx_group_id as (
    select
    distinct tx_group_id
    from algorand.application_call_transaction
    where try_BASE64_DECODE_string(tx_message:txn:note::String) = 'Reach 0.1.10'
    and try_BASE64_DECODE_BINARY(tx_message:txn:apaa[1]::String)::string = '03'
    ),
    swap_tx_group_id_with_count as (
    select
    tx_group_id,
    count(tx_group_id) as number_of_txs
    from algorand.asset_transfer_transaction
    where tx_group_id in (select tx_group_id from swap_tx_group_id)
    group by tx_group_id
    ),
    pool_transactions as (
    select
    distinct
    asset_id
    from algorand.asset_transfer_transaction
    where tx_group_id in (select tx_group_id from swap_tx_group_id_with_count)
    ),
    pool_address as (
    select
    creator_address,
    asset_id
    from flipside_prod_db.algorand.asset
    where asset_id in (select asset_id from pool_transactions)
    and asset_name is null
    ),
    pool_asset as (
    select
    0 as asset_id,
    sender as pool_address,
    tx_group_id
    from flipside_prod_db.algorand.payment_transaction
    Run a query to Download Data