Query editor
SELECTjson_extract_scalar(result, '$.chainId') AS chainid,json_extract_scalar(result, '$.address') AS contract_address,CAST(json_extract_scalar(result, '$.value')AS DOUBLE) AS value,DATE(FROM_UNIXTIME(CAST(json_extract_scalar(result, '$.time') AS BIGINT))) AS dayFROM UNNEST(CAST(json_parse(json_query(http_post ('https://kong.yearn.farm/api/gql','{"query": "query Query($chainId: Int!, $label: String!, $component: String!, $timestamp:BigInt, $period: String, $limit: Int) { timeseries(chainId: $chainId,label: $label, component: $component, timestamp: $timestamp, period: $period, limit: $limit) { chainId address label component period value time} }","variables": {"chainId": 1, "label": "apy-bwd-delta-pps","component": "pricePerShare", "timestamp": 1727740800, "period": "1 week", "limit": 100000}}',ARRAY['Content-Type: application/json', 'Accept: application/json']),'strict $.data.timeseries[*]'WITH ARRAY WRAPPER)) AS ARRAY<JSON>)) AS t (result)