qltyfolio/chart2.sql

              -- not including shell
              -- not including breadcrumbs from sqlpage_aide_navigation
              -- not including page title from sqlpage_aide_navigation

              
    SELECT
    'chart' AS component,
      'Total Automated Test Case Coverage' AS title,
        'pie' AS type,
          TRUE AS labels,
            'green' as color,
            'yellow' as color,
            'chart-right' AS class; --Custom class for styling the second chart

    --Data for the second chart
SELECT
    'Automated' AS label,
      ROUND(100.0 * SUM(CASE WHEN test_type = 'Automation' THEN 1 ELSE 0 END) / COUNT(*), 2) AS value
    FROM
    test_cases;

    SELECT
    'Manual' AS label,
      ROUND(100.0 * SUM(CASE WHEN test_type = 'Manual' THEN 1 ELSE 0 END) / COUNT(*), 2) AS value
    FROM
    test_cases;