winnie-fsCollection information copy copy test color copy
    Updated 2023-04-14
    -- forked from Collection information copy copy test color @ https://flipsidecrypto.xyz/edit/queries/e6c75cbc-4ed6-4e7e-b8e5-88cd48e1c18e

    -- forked from Collection information copy @ https://staging.flipsidecrypto.xyz/edit/queries/d377f278-8b36-4775-8a06-c935bc4cc776

    -- forked from 2cfd1a35-ecb8-4569-88f4-20c2bff57250

    -- forked from f73fa1f1-672f-40b1-b066-55315b0c6f1a
    with
    top_collections as (
    select
    project_name as "Collection",
    count(distinct tx_hash) as "Number of Sales",
    sum(price_usd) as "Total Sales ($)"
    from
    ethereum.core.ez_nft_sales
    where
    block_timestamp::date >= '2022-10-19' -- blur launch
    and project_name is not NULL
    group by
    project_name
    order by
    "Total Sales ($)" desc,
    "Number of Sales" desc
    limit
    15
    )
    select
    BLOCK_TIMESTAMP::date as date,
    '{{Collection}}' as collection,
    platform_name,
    count(distinct tx_hash) as tx_count,
    avg(tx_count) OVER (
    ORDER BY DATE ROWS BETWEEN 7 PRECEDING AND CURRENT ROW
    ) as "Rolling Avg 7d: tx_count",

    sum(price) as total_sales,
    Run a query to Download Data