barbodThe biggest( NFT )sale
    Updated 2022-05-13
    with Auction as (select
    tx_group_id
    from algorand.transactions
    where block_timestamp::date >= '2022-01-01'
    and try_base64_decode_string(tx_message:txn:apaa[0]::string) = 'close_auction'
    group by 1
    ),
    Auction_amount as (
    select block_timestamp , tx_group_id , sum(amount) as amount
    from algorand.payment_transaction
    where tx_group_id in (select * from Auction )
    and amount is not null
    group by 1 ,2
    ),
    buy_now_shuffle_tx_group_ids as (
    select tx_group_id
    from algorand.payment_transaction
    where RECEIVER = 'XNFT36FUCFRR6CK675FW4BEBCCCOJ4HOSMGCN6J2W6ZMB34KM2ENTNQCP4'
    and block_timestamp::date >= '2022-01-01'
    group by 1
    ),
    buy_now_shuffle_tx_group_ids_amount as (
    select block_timestamp , tx_group_id , sum(amount) as amount
    from algorand.payment_transaction
    where tx_group_id in (select * from buy_now_shuffle_tx_group_ids )
    and amount is not null
    group by 1 ,2
    ),
    all_ as (
    select * from Auction_amount
    UNION
    select * from buy_now_shuffle_tx_group_ids_amount
    ),
    price_usd as (
    select date_trunc('hour',block_timestamp) as hourly,
    Run a query to Download Data