Query editor
WITH daily AS (SELECTCAST(json_extract_scalar(item, '$.day') AS timestamp) AS day,CAST(json_extract_scalar(item, '$.games_created') AS bigint) AS games_createdFROM UNNEST(CAST(json_extract(json_parse(http_get('https://tanksfun-indexer-production.up.railway.app/dune/metrics/daily/games')),'$.rows') AS array(json))) AS t(item)),cumulative AS (SELECTCAST(json_extract_scalar(item, '$.day') AS timestamp) AS day,CAST(json_extract_scalar(item, '$.cumulative_games_created') AS bigint) AS cumulative_games_createdFROM UNNEST(CAST(json_extract(json_parse(http_get('https://tanksfun-indexer-production.up.railway.app/dune/metrics/cumulative/games')),'$.rows') AS array(json))) AS t(item))SELECTd.day,d.games_created,c.cumulative_games_created,CASEWHEN c.cumulative_games_created > 0 THEN CAST(d.games_created AS double precision) / c.cumulative_games_createdELSE 0END AS daily_ratioFROM daily dJOIN cumulative c ON d.day = c.dayORDER BY d.day DESC;