Query editor
SELECTdate_trunc('day', from_unixtime(CAST(json_extract(data, '$.date') AS bigint))) AS time,--AVG(CAST(json_extract(data, '$.tvl') AS double)) AS tvlCAST(json_extract(data, '$.tvl') AS double) AS tvlFROM(SELECTjson_parse(http_get ('https://api.llama.fi/v2/historicalChainTvl/Flare')) as defillama1) aCROSS JOIN UNNEST (CAST(defillama1 as array (json))) as t (data)-- GROUP BY date_trunc('week', from_unixtime(CAST(json_extract(data, '$.date') AS bigint)))ORDER BY time DESCLIMIT 1