glaze_the_ham-oxyM9cGetting Started
    Updated 2024-09-25

    -- Get started with Flipside by running your first query:
    -- the SQL statement below will get you a list of NFT
    -- platforms on Ethereum, ranked by how many sales
    -- they've had in the past month.

    -- Be sure to see our documentation for more guidance,
    -- including a full walkthrough of the app:
    -- https://docs.flipsidecrypto.xyz/our-app/getting-started

    SELECT
    DATE_TRUNC(
    'day',
    CONVERT_TIMEZONE('America/Los_Angeles', "Date")
    ) AS "Date",
    SUM(Pinnacle) AS "Pinnacle Trades",
    SUM("Pinnacle Trades") OVER (
    ORDER BY
    DATE_TRUNC(
    'day',
    CONVERT_TIMEZONE('America/Los_Angeles', "Date")
    ) ASC
    ) AS "Cumulative Pinnacle Trades"
    FROM
    (
    SELECT
    to_date(BLOCK_TIMESTAMP) as "Date",
    *,
    CASE
    WHEN CHARINDEX(
    'A.edf9df96c92f4595.Pinnacle',
    EVENT_DATA :: String
    ) > 0 THEN 1
    ELSE 0
    END AS Pinnacle,
    FROM
    QueryRunArchived: QueryRun has been archived