I'm experiencing something similar with this MySQL query. I get a blank screen using the "Percent" format on a pie chart. Running it on my MySQL client, I get a count result for both statuses but a blank screen in the admin area. With my data, I'm getting 75 verified and 25 pending. When I select "Table" to "Display as" it shows the table with the correct data.
Is there something I'm doing wrong? Thanks for the help! Here's the query below:
SELECT status_description,
FORMAT(COUNT(1) / total_count * 100, 0) AS count
FROM (
SELECT
c.status,
CASE
WHEN status = 0 THEN 'Pending'
WHEN status = 1 THEN 'Verified'
ELSE 'Unknown'
END AS status_description
FROM customers as c
) AS subquery
CROSS JOIN (
SELECT COUNT(1) AS total_count
FROM customers
) AS total_counts
GROUP BY status_description, total_count;
I'm experiencing something similar with this MySQL query. I get a blank screen using the "Percent" format on a pie chart. Running it on my MySQL client, I get a count result for both statuses but a blank screen in the admin area. With my data, I'm getting 75 verified and 25 pending. When I select "Table" to "Display as" it shows the table with the correct data.
Is there something I'm doing wrong? Thanks for the help! Here's the query below: