将 3 个 SQL 查询组合成一个返回我想要的所有内容的简单查询时,我遇到了一个大问题。有什么方法可以将这些简单的 sql 查询合并为一个吗?
查询1:
SELECT COUNT(FieldID) AS "CountA"
FROM table WHERE Rezervovany = 0 AND Prodany = 0
查询2:
SELECT COUNT(FieldID) AS "CountB"
FROM table WHERE Rezervovany = 1 AND Prodany = 0
查询3:
SELECT COUNT(FieldID) AS "CountC"
FROM table WHERE Prodany = 1