ID | VALUE | CLASS | |
---|---|---|---|
1 | 1 | 15 | Red |
2 | 2 | 20 | Red |
3 | 3 | 8 | Blue |
4 | 4 | 19 | Blue |
5 | 5 | 150 | Green |
charliemarketplacegoogle-sheets-demo
Updated 2024-02-13
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
›
⌄
with res AS (
SELECT
livequery.live.udf_api(
'GET',
'https://science.flipsidecrypto.xyz/googlesheets/readsheet',
{ 'Content-Type': 'application/json' },
{
'sheets_id' : '1isXwTpJlxMClz1Kg0tkSNMwhd8Z944IgprPULx_aqWg',
'tab_name' : 'Sheet1'
}
) as result
from DUAL
),
data AS (
select result:data as json_result_must_pivot from res
)
SELECT
d.value:"ID"::VARCHAR as ID,
TO_NUMBER(d.value:"Value") as Value,
d.value:"Class"::VARCHAR as Class
FROM
data,
LATERAL FLATTEN(input => data.json_result_must_pivot::VARIANT) d
Last run: about 1 year ago
5
80B
2s