bachiRAND NFT gallery
    Updated 2022-05-09
    --select * from algorand.payment_transaction where tx_group_id like 'm5Xmjvw60T+/9+xo15Oi5GjffoRHNRtBkSYDDZBeLgc='
    --and receiver='RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE'

    /*select date(block_timestamp) as day, sum(tx_message:txn:amt) as sale_amt , sum(tx_message:txn:amt * 0.711257) as sale_amt_usd,
    count(Distinct tx_id) as no_of_nfts_sold, sum(tx_message:txn:fee) as fee from algorand.transactions
    where sender = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE'
    and tx_type = 'pay' and tx_type_name = 'payment'
    group by day order by day desc*/


    select date(block_timestamp) as day, count(distinct tx_group_id) as no_of_sales, round(sum(amount),2) as total_sale_amt_algos ,
    round(sum(amount * 0.711257),2) as total_sale_amt_usd, sum(fee) as total_fees,
    sum(fees) over(order by day asc rows between unbounded preceding and current row) as accumulated_fees
    from algorand.payment_transaction where
    tx_group_id in (select distinct tx_group_id from algorand.payment_transaction
    where receiver = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE') group by day order by day desc

    /*select distinct asset_id, sum(amount) as total_sale_amt_algos, sum(amount * 0.711257) as total_sale_amt_usd, sum(fee) as fees
    from algorand.payment_transaction where receiver = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE' and amount > 0 and amount is not null
    group by asset_id */




    Run a query to Download Data