barbodShow how much ALGOxNFT has earned in fees daily and accumulated over time for 2022.
    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 tx_id ,amount as Fee
    from algorand.payment_transaction
    where tx_group_id in (select * from Auction )
    group by 1,2
    ),
    buy_now_shuffle_tx_group_ids as (
    select tx_id , amount as Fee
    from algorand.payment_transaction
    where RECEIVER = 'XNFT36FUCFRR6CK675FW4BEBCCCOJ4HOSMGCN6J2W6ZMB34KM2ENTNQCP4'
    and block_timestamp::date >= '2022-01-01'
    group by 1,2
    ),
    all_ as (
    select * from Auction_amount
    UNION
    select * from buy_now_shuffle_tx_group_ids
    ),
    amounts as ( select
    date_trunc('hour',block_timestamp ) as date ,
    sum (a.Fee) as Fee,
    sum(a.Fee*price_usd) as Fee_usd
    from algorand.transactions t join all_ a join algorand.prices_swap p
    on p.block_hour = date_trunc('hour',block_timestamp )
    and t.tx_id = a.tx_id
    where date_trunc('day',date)::date >= '2022-01-01'::date
    and p.ASSET_ID = 0
    group by 1
    )
    Run a query to Download Data