nitsRAND top users by amount paid
    Updated 2022-05-26
    -- SELECT date(block_timestamp) as day, sum(amount) as total_fees,sum(total_fees) over (order by day) as cumulative_total_fees,
    -- cumulative_total_fees*0.72 as cumulative_total_fees_usd , count(DISTINCT tx_group_id) as total_sales,
    -- sum(total_sales) over (order by day) as cumulative_total_sales

    SELECT sender,sum(amount) as total_amt_spent
    from algorand.payment_transaction
    where receiver = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE' and asset_id = '0' and amount is not NULL
    -- where tx_group_id ilike 'm5Xmjvw60T+/9+xo15Oi5GjffoRHNRtBkSYDDZBeLgc='
    GROUP by 1
    ORDER by 2 desc
    limit 10
    Run a query to Download Data