boomer77daily holders count - wip
    Updated 2023-04-05
    with sell as (
    SELECT
    date(block_timestamp) as dt,
    nft_from_address as address,
    tokenid,
    '-1' as flow
    FROM polygon.core.ez_nft_transfers
    where nft_address = lower('0x09421f533497331e1075fdca2a16e9ce3f52312b') ),

    buy as (

    select
    date(block_timestamp) as dt,
    nft_to_address as address,
    tokenid,
    '1' as flow
    FROM polygon.core.ez_nft_transfers
    where nft_address = lower('0x09421f533497331e1075fdca2a16e9ce3f52312b')

    )

    select a.dt, count(DISTINCT a.address) as sell, count(distinct b.address) as buy
    from sell a
    join buy b on a.dt = b.dt
    group by 1
    order by 1 asc

    last as (select
    dt,
    count(distinct address) as add , sad
    sum(flow) as holdings
    from raw
    group by dt
    having holdings > 0
    order by 2 desc)

    Run a query to Download Data