glaze_the_ham-oxyM9cGetting Started
Updated 2024-09-25Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
-- 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