Ant-DAO-MentLive Query - From Query
    Updated 2025-03-11
    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