Ant-DAO-MentLive Query - From Query
Updated 2025-03-11Copy 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
›
⌄
with raw_data as (
-- query the raw data from api
select livequery.live.udf_api('https://api.flipsidecrypto.com/api/v2/queries/0a714140-c56a-441a-9ea3-fd7b38853ca5/data/latest') as fs_data
),
filter as (
select
-- extract the data from api call into a json object
try_parse_json(fs_data::string)::variant as my_json_object
from raw_data
),
clean_data as (
-- now extract the data into a table of jsons
select
try_parse_json(data.value)::variant as value
from filter, lateral flatten (input => my_json_object:data) as data
),
breakup_json as (
-- then extract the jsons into columns
select
value:WALLET::string as wallets
from clean_data
)
select * from breakup_json
QueryRunArchived: QueryRun has been archived