{"ok":true,"cached":true,"plan":{"sql":"WITH matched_unicorns AS (\n  SELECT\n    id, name, valuation_billion, valuation_text, country, city, industry, industry_domain,\n    space_segment, is_launch_provider, detail_url,\n    COALESCE(NULLIF(CAST(industry AS text), ''), 'Unknown') AS unicorn_group\n  FROM unicorn.company\n  WHERE country ILIKE 'United States' AND (industry_domain = 'ai' OR industry ILIKE '%AI%' OR industry ILIKE '%Artificial Intelligence%' OR about ILIKE '%artificial intelligence%')\n),\ngroup_stats AS (\n  SELECT\n    unicorn_group,\n    CAST(COUNT(*) AS int) AS group_unicorn_count,\n    CAST(COUNT(*) FILTER (WHERE COALESCE(valuation_billion, 0) >= 10.0) AS int) AS group_over_valuation_unicorns,\n    CAST(ROUND(100.0 * COUNT(*) FILTER (WHERE COALESCE(valuation_billion, 0) >= 10.0) / NULLIF(COUNT(*), 0), 2) AS double precision) AS group_over_valuation_pct,\n    CAST(MAX(COALESCE(valuation_billion, 0)) AS double precision) AS top_valuation_billion,\n    (ARRAY_AGG(name ORDER BY COALESCE(valuation_billion, 0) DESC NULLS LAST))[1] AS top_company\n  FROM matched_unicorns\n  GROUP BY unicorn_group\n),\nsummary AS (\n  SELECT\n    CAST(COUNT(*) AS int) AS total_unicorns,\n    CAST(COUNT(DISTINCT unicorn_group) AS int) AS unicorn_group_count,\n    CAST(10.0 AS double precision) AS valuation_threshold_billion,\n    CAST(COUNT(*) FILTER (WHERE COALESCE(valuation_billion, 0) >= 10.0) AS int) AS over_valuation_unicorns,\n    CAST(ROUND(100.0 * COUNT(*) FILTER (WHERE COALESCE(valuation_billion, 0) >= 10.0) / NULLIF(COUNT(*), 0), 2) AS double precision) AS over_valuation_pct,\n    CAST(SUM(COALESCE(valuation_billion, 0)) AS double precision) AS total_valuation_billion\n  FROM matched_unicorns\n)\nSELECT\n  0 AS sort_order,\n  scope_name || ' summary' AS title,\n  scope_name,\n  group_by,\n  NULL::text AS unicorn_group,\n  total_unicorns, unicorn_group_count, valuation_threshold_billion,\n  over_valuation_unicorns, over_valuation_pct, total_valuation_billion,\n  NULL::int AS group_unicorn_count, NULL::int AS group_over_valuation_unicorns,\n  NULL::double precision AS group_over_valuation_pct,\n  NULL::text AS top_company, NULL::double precision AS top_valuation_billion\nFROM summary, (SELECT 'United States AI unicorns' AS scope_name, 'industry' AS group_by) p\nUNION ALL\nSELECT\n  CAST(ROW_NUMBER() OVER (ORDER BY group_unicorn_count DESC, top_valuation_billion DESC) AS int) AS sort_order,\n  'Group - ' || unicorn_group AS title,\n  'United States AI unicorns' AS scope_name,\n  'industry' AS group_by,\n  unicorn_group,\n  NULL::int, NULL::int, CAST(10.0 AS double precision),\n  NULL::int, NULL::double precision, NULL::double precision,\n  group_unicorn_count, group_over_valuation_unicorns, group_over_valuation_pct,\n  top_company, top_valuation_billion\nFROM group_stats\nORDER BY sort_order, group_unicorn_count DESC NULLS LAST\nLIMIT 10","mode":"sql","view":"auto","limit":10,"notes":[],"offset":0,"rationale":"pg sql path (Text-to-SQL / vector over pgvector)"},"results":[{"key":"name:United States AI unicorns summary","url":null,"score":null,"title":"United States AI unicorns summary","group_by":"industry","scope_name":"United States AI unicorns","total_unicorns":245,"over_valuation_pct":9.8,"unicorn_group_count":6,"over_valuation_unicorns":24,"total_valuation_billion":2279.43041992188,"valuation_threshold_billion":10},{"key":"name:Group - Enterprise Tech","url":null,"score":null,"title":"Group - Enterprise Tech","group_by":"industry","scope_name":"United States AI unicorns","top_company":"OpenAI","unicorn_group":"Enterprise Tech","group_unicorn_count":97,"top_valuation_billion":840,"group_over_valuation_pct":13.4,"valuation_threshold_billion":10,"group_over_valuation_unicorns":13},{"key":"name:Group - Consumer & Retail","url":null,"score":null,"title":"Group - Consumer & Retail","group_by":"industry","scope_name":"United States AI unicorns","top_company":"Fanatics","unicorn_group":"Consumer & Retail","group_unicorn_count":79,"top_valuation_billion":31,"group_over_valuation_pct":6.33,"valuation_threshold_billion":10,"group_over_valuation_unicorns":5},{"key":"name:Group - Media & Entertainment","url":null,"score":null,"title":"Group - Media & Entertainment","group_by":"industry","scope_name":"United States AI unicorns","top_company":"Epic Games","unicorn_group":"Media & Entertainment","group_unicorn_count":44,"top_valuation_billion":22.5,"group_over_valuation_pct":9.09,"valuation_threshold_billion":10,"group_over_valuation_unicorns":4},{"key":"name:Group - Industrials","url":null,"score":null,"title":"Group - Industrials","group_by":"industry","scope_name":"United States AI unicorns","top_company":"Skild AI","unicorn_group":"Industrials","group_unicorn_count":13,"top_valuation_billion":14,"group_over_valuation_pct":15.38,"valuation_threshold_billion":10,"group_over_valuation_unicorns":2},{"key":"name:Group - Healthcare & Life Sciences","url":null,"score":null,"title":"Group - Healthcare & Life Sciences","group_by":"industry","scope_name":"United States AI unicorns","top_company":"Caris","unicorn_group":"Healthcare & Life Sciences","group_unicorn_count":7,"top_valuation_billion":7.82999992370605,"group_over_valuation_pct":0,"valuation_threshold_billion":10,"group_over_valuation_unicorns":0},{"key":"name:Group - Financial Services","url":null,"score":null,"title":"Group - Financial Services","group_by":"industry","scope_name":"United States AI unicorns","top_company":"Addepar","unicorn_group":"Financial Services","group_unicorn_count":5,"top_valuation_billion":3.25,"group_over_valuation_pct":0,"valuation_threshold_billion":10,"group_over_valuation_unicorns":0}],"answer":null,"meta":{"q":"美国AI独角兽估值超过10B的有多少，分几类","mode":"query","view":"auto","page":1,"limit":10}}