john-adamUntitled Query
    Updated 2022-10-19
    with nft_market as (select distinct TX_RECEIVER from near.core.ez_nft_mints)

    ,allnft_markets as (select count(*),count(distinct TX_SIGNER), TX_RECEIVER from near.core.fact_transactions where TX_RECEIVER in (select TX_RECEIVER from nft_market)
    and block_timestamp::date >= current_date - interval '90 days'
    group by 3)
    , top10nftmarket as (select count(*),TX_RECEIVER from near.core.fact_transactions where TX_RECEIVER in (select TX_RECEIVER from nft_market)
    and block_timestamp::date >= current_date - interval '90 days'
    group by 2
    order by 1 DESC
    limit 5)
    , nftmarket_overtime as (select count(*),count(distinct TX_SIGNER),block_timestamp::date from near.core.fact_transactions where TX_RECEIVER in (select TX_RECEIVER from nft_market)
    and block_timestamp::date >= current_date - interval '90 days'
    group by 3)

    , nftmarket_overtime_top10 as (select count(*),count(distinct TX_SIGNER),TX_RECEIVER,block_timestamp::date from near.core.fact_transactions where TX_RECEIVER in (select TX_RECEIVER from top10nftmarket)
    and block_timestamp::date >= current_date - interval '90 days'
    group by 3,4)

    select * from top10nftmarket
    Run a query to Download Data