theericstonezapper example
    -- let's write a query to find the biggest buyer of
    -- $MEME today across all dexes
    with topbuyer as (
    select distinct first_value(origin_from_address) OVER (order by totalvol desc)
    as address FROM
    (select origin_from_address,
    sum(amount_out) as totalvol
    from ethereum.core.ez_dex_swaps
    where block_timestamp > current_date - 1
    and origin_from_address NOT IN (select address from ethereum.core.dim_labels)
    and token_out = '{{tokenaddress}}'
    group by origin_from_address
    )
    ),

    -- now it is simple to grab their latest holdings for
    -- a given address via zapper
    holdings as (
    select livequery.live.udf_api(
    concat(
    'https://api.zapper.xyz/z/v2/balances/tokens?addresses[]=',
    (select address from topbuyer)
    )
    ) as response
    ),

    networks as (
    select value as network,
    row_number() OVER ( order by (select NULL) ) as rn
    from
    holdings,
    lateral flatten (input => response:data, recursive => true )
    having key = 'network'
    ),
    tokvalues as (
    select
    Run a query to Download Data