binhachonAlgorand Competitive advantages Algorand NFTs Atomic Transfer Sales - #3
    Updated 2022-06-16
    with NFT_list as (
    select
    asset_id
    from flipside_prod_db.algorand.asset
    where total_supply = 1
    and decimals = 0
    ),
    arc_NFT_list as (
    select
    asset_id,
    try_parse_json(try_base64_decode_string(tx_message:txn:note::string)):standard::string as standard
    from flipside_prod_db.algorand.asset_configuration_transaction
    where asset_id in (select asset_id from NFT_list)
    and try_parse_json(try_base64_decode_string(tx_message:txn:note::string)):standard::string in ('arc69')
    union all
    select
    asset_id,
    'arc3' as standard
    from algorand.asset
    where contains(asset_url, '#arc3')
    ),
    potential_transactions as (
    select
    block_timestamp,
    tx_group_id,
    tx_id,
    sender as NFT_seller,
    asset_receiver as NFT_buyer,
    asset_id,
    asset_amount
    from flipside_prod_db.algorand.asset_transfer_transaction
    where sender != asset_receiver
    and asset_amount is not null
    and tx_group_id is not null
    and asset_id in (select asset_id from arc_NFT_list)
    and tx_group_id not in (select distinct tx_group_id from flipside_prod_db.algorand.application_call_transaction where tx_group_id is not null)
    Run a query to Download Data