nsa2000the most popular users-atomic swaps marketplace
    Updated 2022-11-12
    with priceTb as (
    select block_hour::date as p_date,
    avg (price_usd) as algo_Price
    from algorand.core.ez_price_pool_balances
    group by 1
    )

    select
    purchaser,
    count(distinct tx_group_id) as "Sales Cnt",
    count(distinct collection_name) as "Collections Cnt",
    count(distinct nft_asset_id) as "NFTs Cnt",
    sum(total_sales_amount) as "Sales Volume(Algo)",
    sum(total_sales_amount*algo_Price) as "Sales Volume($)",
    avg(total_sales_amount) as "Avg Sales Volume(Algo)",
    avg(total_sales_amount*algo_Price) as "Avg Sales Volume($)"
    from algorand.nft.ez_nft_sales a join priceTb b on a.block_timestamp::date = b.p_date
    where nft_marketplace ilike ('{{Marketplace1}}')
    AND block_timestamp >= CURRENT_DATE - INTERVAL '{{Past_Weeks}} week'
    and total_sales_amount > 0
    and collection_name is not null
    group by 1
    order by 2 DESC
    limit 10
    -- rand gallery, algoxnft, atomic swaps, ab2 gallery, octorand, shufl
    Run a query to Download Data