Updated 2024-08-28
    with

    data as (
    select
    livequery.live.udf_api('get','https://api.nearblocks.io/v1/fts/wrap.near/holders?page=1&per_page=25&order=desc', {'accept': 'application/json'}, {}):data:holders as response

    union

    select
    livequery.live.udf_api('get','https://api.nearblocks.io/v1/fts/wrap.near/holders?page=2&per_page=25&order=desc', {'accept': 'application/json'}, {}):data:holders as response

    union

    select
    livequery.live.udf_api('get','https://api.nearblocks.io/v1/fts/wrap.near/holders?page=3&per_page=25&order=desc', {'accept': 'application/json'}, {}):data:holders as response

    union

    select
    livequery.live.udf_api('get','https://api.nearblocks.io/v1/fts/wrap.near/holders?page=4&per_page=25&order=desc', {'accept': 'application/json'}, {}):data:holders as response

    union

    select
    livequery.live.udf_api('get','https://api.nearblocks.io/v1/fts/wrap.near/holders?page=5&per_page=25&order=desc', {'accept': 'application/json'}, {}):data:holders as response
    ),

    main as (
    select
    f.value:account as account_address,
    f.value:amount/1e24 as amount
    from data
    join lateral flatten(input => response) f
    where account_address not in (select distinct address from near.core.dim_address_labels)
    order by amount desc
    limit 100),
    QueryRunArchived: QueryRun has been archived