adriaparcerisasFlow NFT Wallet Behavior nft day 2 copy
    Updated 2023-09-20
    WITH
    flow_collections_debut as (
    select
    nft_collection,
    min(block_timestamp) as debut
    from flow.nft.ez_nft_sales
    group by 1
    ),
    flow_new_collections as (
    SELECT
    trunc(debut,'{{granularity}}') as date,
    count(distinct nft_collection) as new_collections,
    sum(new_collections) over (order by date) as total_collections
    from flow_collections_debut
    group by 1
    ),
    flow_active_collections as (
    SELECT
    trunc(block_timestamp,'{{granularity}}') as date,
    count(distinct nft_collection) as active_collections
    from flow.nft.ez_nft_sales
    group by 1
    ),
    flow as (
    SELECT
    x.date,
    active_collections, new_collections, total_collections
    from flow_active_collections x join flow_new_collections y on x.date=y.date
    where x.date >= CURRENT_DATE - INTERVAL '{{period}}'
    and x.date <'2023-09-01'
    order by 1 asc
    ),
    sol_collections_debut as (
    Run a query to Download Data