我的查詢語句在設置和預算時都返回null。MySQL多查詢返回空值查詢
但是,如果我刪除值11後的所有內容,它的工作原理。
有誰知道最近怎麼回事?
SELECT SUM(setup_fee) AS setup,
SUM(budget) AS budget
FROM gdn
WHERE client = 11
AND start_date BETWEEN 2017-03-26 AND 2017-04-30
AND end_date BETWEEN 2017-03-26 AND 2017-04-30
嘗試enc用'()'丟失每個條件 – Swellar
您錯過了'group by'子句 – Jens
如果刪除'client = 11 AND',會發生什麼? – Bondt