PapasotRand Gallery USD volume
    Updated 2023-01-03
    with tx as(select
    DISTINCT TX_GROUP_ID
    from algorand.payment_transaction
    where
    RECEIVER = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE'
    and ASSET_ID = 0
    and amount> 0
    and TX_TYPE_NAME = 'payment'
    and tx_group_id is not NULL
    ),
    sales_tx as (

    select DISTINCT tx_group_id
    from algorand.payment_transaction
    where tx_group_id in (select * from tx)
    and sender = RECEIVER
    ),
    algo_price as (select
    avg(price_usd) as price ,
    BLOCK_HOUR::date as day
    from algorand.prices_swap
    where asset_id= 0
    GROUP by day
    )
    ,
    sales as (
    select
    count(DISTINCT TX_GROUP_ID) as salses_num ,
    BLOCK_TIMESTAMP::date as day ,
    date_trunc(month,BLOCK_TIMESTAMP) as month ,
    count(DISTINCT SENDER) as uniqe_users ,
    sum(AMOUNT) as total_Algo ,
    -- sum(AMOUNT) * b.price as total_USD,
    Run a query to Download Data