以下是我的查詢,我認爲原則上它應該工作,但我不知道如果它確實是可能的,或者我也在想外面這個盒子。我想分兩個選擇查詢使用SQL,不知道這是否可能
SELECT
(SELECT `orders`.`Status`, COUNT(*) AS COUNT_2 FROM `orders` `sw_orders` WHERE STATUS = 'booking' AND Date(OrderDate) <= CURDATE() AND Date(OrderDate) > DATE_SUB(CURDATE(),INTERVAL 30 DAY))/
(SELECT `orders`.`Status`, COUNT(*) AS COUNT_2 FROM `orders` `sw_orders` WHERE STATUS = 'quote' AND Date(OrderDate) <= CURDATE() AND Date(OrderDate) > DATE_SUB(CURDATE(),INTERVAL 30 DAY))
AS result
應該返回這裏預訂用雙引號
我不是,因爲對自己的兩個主要querys,算上預訂和報價的數量在狀態欄 –