freemartianDaily Trade
    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
    ),

    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)
    where event = 'sale'
    GROUP BY ALL
    ORDER BY 1 DESC
    )

    SELECT
    block_timestamp::date AS day,
    count(tx_hash) AS transactions,
    count(DISTINCT seller) AS seller,
    count(DISTINCT buyer) AS buyer,
    SUM(price) AS eth_value,
    SUM(qty) AS quantity,
    max(price) AS max_sell_price,
    min(price) AS min_sell_price,
    FROM datas
    Last run: 8 days agoAuto-refreshes every 1 hour
    DAY
    TRANSACTIONS
    SELLER
    BUYER
    ETH_VALUE
    QUANTITY
    MAX_SELL_PRICE
    MIN_SELL_PRICE
    1
    2025-02-15 00:00:00.000332422306.95339.859
    2
    2025-02-14 00:00:00.0001057554952.50587810510.8997.95
    3
    2025-02-13 00:00:00.000534224415.826959538.37.33
    4
    2025-02-12 00:00:00.000201416157.8039208.37.35
    5
    2025-02-09 00:00:00.00024917151.385247.1955.32
    6
    2025-02-10 00:00:00.000262417179.1978267.55.85
    7
    2025-02-08 00:00:00.00098764.09799997.3299996.78
    8
    2025-02-07 00:00:00.000151312107.443981157.326.86
    9
    2025-02-04 00:00:00.00015141492.42698156.795.71
    10
    2025-02-06 00:00:00.00014121295.07099299146.9689986.42
    11
    2025-02-02 00:00:00.000302624158.706305.994.75
    12
    2025-02-01 00:00:00.00015111393.48156.695.25
    13
    2025-01-30 00:00:00.00055334.01199957.0466.44
    14
    2025-01-28 00:00:00.00055433.966957.25696.67
    15
    2025-01-22 00:00:00.000473627357.757969479.795.1
    16
    2025-01-05 00:00:00.0001110743.577098114.0863.75
    17
    2025-01-24 00:00:00.000151313127.559997158.88.2
    18
    2025-01-19 00:00:00.000171512106.57899199176.9989945.74
    19
    2025-01-03 00:00:00.00015141055.572488154.1980.0015
    20
    2025-01-26 00:00:00.00033323.0537.857.6
    57
    3KB
    367s