flyingfishGet data from previous query copy
Updated 2023-12-28
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
⌄
-- forked from Get data from previous query @ https://flipsidecrypto.xyz/edit/queries/587d5d97-5d97-4b31-a846-36bab4f06940
/*
The query id can be taken from the browser address bar when editing your target query
*/
with get_base_query AS (
-- Get data from target query
SELECT
value
, value[0]
, value[1]
--, value[2]::numeric AS actions
FROM (
SELECT
livequery.live.udf_api(
'https://flipsidecrypto.xyz/api/queries/ab109725-ebf0-4b15-976f-723025d77d2c/latest-run'
) as response
), lateral FLATTEN (input => response:data:result:rows)
)
SELECT * from get_base_query
-- Calc a few stats
QueryRunArchived: QueryRun has been archived