bachiflow nft whales
    Updated 2022-07-19
    WITH flow_nft_buyers
    AS (SELECT block_timestamp AS bought_date,
    nft_collection,
    buyer
    FROM flow.core.fact_nft_sales
    WHERE tx_succeeded = 'TRUE'),
    flow_week_sales as (
    SELECT date(block_timestamp) AS DAY,
    Count(DISTINCT( seller )) AS flippers_within_week
    FROM flow.core.fact_nft_sales a
    join flow_nft_buyers b
    ON a.seller = b.buyer
    AND a.nft_collection = b.nft_collection
    WHERE Datediff(day, a.block_timestamp, bought_date) <= 7
    GROUP BY 1
    ),
    ethereum_nft_buyers
    AS (SELECT block_timestamp AS bought_date,
    nft_address,
    buyer_address
    FROM ethereum.core.ez_nft_sales
    WHERE event_type = 'sale'
    AND price_usd > 0),
    ethereum_week_sales
    AS (SELECT date(block_timestamp) AS day,
    Count(DISTINCT( seller_address )) AS flippers_within_week
    FROM ethereum.core.ez_nft_sales a
    join ethereum_nft_buyers b
    ON a.seller_address = b.buyer_address
    AND a.nft_address = b.nft_address
    WHERE Datediff(day, a.block_timestamp, bought_date) <= 7
    GROUP BY day)

    Run a query to Download Data