Query editor
-- Cumulative Resolutions by Category (Resolution Oracle)-- Source: https://interface.cournot.ai/cournot/dune/cumulative_resolution_by_category (LiveFetch)-- The API endpoint already filters out the current (incomplete) UTC day.-- The API can return several rows with the same category label, so counts are summed-- per category and share_pct is recomputed from those counts (sums to 100).WITH api AS (SELECT json_parse(http_get('https://interface.cournot.ai/cournot/dune/cumulative_resolution_by_category')) AS body),items AS (SELECT itemFROM apiCROSS JOIN UNNEST(CAST(json_extract(body, '$.data.items') AS array(json))) AS t(item)),parsed AS (SELECT json_extract_scalar(item, '$.category') AS category,CAST(json_extract_scalar(item, '$.count') AS bigint) AS resolutionsFROM items)SELECT category,SUM(resolutions) AS cumulative_resolutions,ROUND(100.0 * SUM(resolutions) / SUM(SUM(resolutions)) OVER (), 2) AS share_pctFROM parsedGROUP BY 1ORDER BY cumulative_resolutions DESC