freemartianMinters Who Bought Kaito
    Updated 8 days ago
    with sapes_api AS(
    SELECT livequery.live.udf_api(
    'https://raw.githubusercontent.com/mehdimarjan/Opensea/refs/heads/main/sale.json'
    ) AS response
    ),

    sales 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
    ),
    mints AS(
    SELECT
    block_timestamp,
    tx_hash,
    (CASE
    WHEN decoded_log:dropStageIndex = 1 THEN 'Phase1'
    WHEN decoded_log:dropStageIndex = 2 THEN 'Phase2'
    END) AS phase,
    decoded_log:feeRecipient AS fee_recipient,
    decoded_log:minter AS minter,
    decoded_log:quantityMinted AS quantity_minted,
    decoded_log:unitMintPrice / pow(10,18) AS unit_mint_price,
    Last run: 8 days agoAuto-refreshes every 1 hour
    USER
    1
    45
    1
    6B
    158s