我有以下查询:
SELECT count(id) from table_1 WHERE field_1 = 1
SELECT count(id) from table_1 WHERE field_2 = 1
SELECT count(id) from table_1 WHERE field_2 = 1
这可以在单个查询中完成吗?只使用一个表,但有 3 个输出,例如:
count(id) | count(id) | count(id)<br>
12 | 44 | 55