SELECT
status_records.status AS statusname
, COUNT(*) AS statuscount
FROM (
SELECT
'Open' AS status
UNION ALL
SELECT
'Closed' AS status
UNION ALL
SELECT
'Rejected' AS status
UNION ALL
SELECT
'Cancelled' AS status
) AS status_records
LEFT JOIN
myTable
ON
status_records.status = myTable.status
GROUP BY
status_records.status
有人可以告诉我为什么程序输出为-121吗? 预先谢谢你