你在嘗試這樣的事情嗎: CREATE TABLE OCCUPATIONS ( Occupation varchar(100) );INSERT INTO OCCUPATIONS VALUES ('doctor'),('doctor'), ('singer'),('singer'), ('doctor'),('doctor'), ('singer'),('singer'), ('doctor'),('singer'), ('singer'),('singer');SELECT CASE WHEN Occupation = "doctor" THEN CONCAT("There are a total of ", tbl.dCount, " " , Occupation, "s.") WHEN Occupation = "singer" THEN CONCAT("There are a total of ", tbl.sCount, " " , Occupation, "s.") END as total_countFROM ( SELECT COUNT(Occupation) AS dCount,null as sCount, Lower(Occupation) AS Occupation FROM OCCUPATIONS WHERE Occupation = 'doctor'gro