freemartianTop Holders NFT Collections
    Updated 2025-04-09
    -- with sapes_api as (
    -- SELECT
    -- livequery.live.udf_api(
    -- 'https://raw.githubusercontent.com/mehdimarjan/Opensea/refs/heads/main/sale.json'
    -- ) AS response
    -- ),
    -- datas AS(
    -- SELECT
    -- to_timestamp(value:closing_date) AS block_timestamp,
    -- value:transaction AS tx_hash,
    -- value:event_type AS event,
    -- value:protocol_address AS protocol_address,
    -- value:nft:identifier AS identifier,
    -- value:nft:collection AS collection,
    -- value:chain AS chain,
    -- value:buyer AS buyer,
    -- value:seller AS seller,
    -- (value:payment:quantity) / pow(10, 18) AS price,
    -- -- ROUND(((value:payment:quantity) / pow(10,18)),8) AS price,
    -- value:quantity AS qty
    -- FROM
    -- sapes_api,
    -- LATERAL FLATTEN (input => response:data)
    -- GROUP BY
    -- ALL
    -- ORDER BY
    -- 1 DESC
    -- ),
    -- sellers AS(
    -- SELECT
    -- seller AS seller,
    -- count(tx_hash) AS transactions,
    -- -- count(DISTINCT seller) AS seller,
    -- -- count(DISTINCT buyer) AS buyer,
    -- SUM(price) AS eth_value,
    -- SUM(qty) AS quantity