我有这些查询:+ b# g+ l. J7 j/ z* G
SELECT COUNT(*) FROM t_table WHERE color = 'YELLOW';SELECT COUNT(*) FROM t_table WHERE color = 'BLUE';SELECT COUNT(*) FROM t_table WHERE color = 'RED';有没有办法在查询中获得这些结果?. E1 v! _ A, X% s |0 u
' r) W6 M2 N* ^# c ^ 解决方案: : `* a! V' M- t3 c8 n SELECT color,COUNT(*) FROM t_table GROUP BY color