Query editor
WITH src AS (SELECT 'agni-finance' AS slug, json_parse(http_get('https://api.llama.fi/protocol/agni-finance')) AS jUNION ALL SELECT 'merchant-moe', json_parse(http_get('https://api.llama.fi/protocol/merchant-moe')) AS jUNION ALL SELECT 'lendle', json_parse(http_get('https://api.llama.fi/protocol/lendle')) AS jUNION ALL SELECT 'init-capital', json_parse(http_get('https://api.llama.fi/protocol/init-capital')) AS jUNION ALL SELECT 'stargate-finance', json_parse(http_get('https://api.llama.fi/protocol/stargate-finance')) AS jUNION ALL SELECT 'karak-protocol', json_parse(http_get('https://api.llama.fi/protocol/karak-protocol')) AS jUNION ALL SELECT 'intentx', json_parse(http_get('https://api.llama.fi/protocol/intentx')) AS jUNION ALL SELECT 'apex-protocol', json_parse(http_get('https://api.llama.fi/protocol/apex-protocol')) AS jUNION ALL SELECT 'minterest', json_parse(http_get('https://api.llama.fi/protocol/minterest')) AS jUNION ALL SELECT 'cian-protocol', json_parse(http_get('https://api.llama.fi/protocol/cian-protocol')) AS jUNION ALL SELECT 'fusionx-finance', json_parse(http_get('https://api.llama.fi/protocol/fusionx-finance')) AS j),-- Get the most recent entry per protocol and show ALL token keysentries AS (SELECTslug,date(from_unixtime(CAST(json_extract_scalar(entry, '$.date') AS bigint))) AS dt,json_format(json_extract(entry, '$.tokens')) AS tokens_rawFROM src,UNNEST(CAST(COALESCE(json_extract(j, '$.chainTvls.Mantle.tokensInUsd'),json_extract(j, '$.chainTvls.mantle.tokensInUsd')) AS array(json))) AS t(entry))SELECTslug,MAX(dt) AS latest_dt,-- Show the token keys from the most recent date so we can see exact namingMAX_BY(tokens_raw, dt) AS latest_tokensFROM entriesGROUP BY slugORDER BY slug