0
我有這樣的MS Access數據:SQL SUM和COUNT多個列
+------------+-----------+
| DateStart | PATIssued |
+------------+-----------+
| 12/12/2004 | Yes |
+------------+-----------+
| 13/12/2004 | No |
+------------+-----------+
| 14/12/2004 | No |
+------------+-----------+
| 12/12/2004 | No |
+------------+-----------+
| 12/12/2004 | Yes |
+------------+-----------+
| 14/12/2004 | No |
+------------+-----------+
| 13/12/2004 | Yes |
我想星期幾來算,每天記錄,在過去的一週號碼,並在另一列數記錄,其中PATIssued =是
那麼結果會是什麼樣子:
Date DayCount PATCount
Monday 3 2
Tuesday 2 1
Wednesday 2 0
我已經儘可能
得到的問題是,這將返回
Date PATIssuedYN DayCount PATCount
Monday No 1
Monday Yes 2 2
Tuesday No 1
Tuesday Yes 1 1
Wednesday No 2
Wednesday Yes 0 0
,其中星期一爲12/12,週二週三13/12 14/12是
刪除'從你的選擇和組PATIssuedYN'由 – JamieD77
使用條件,即PATIssuedYN =是 –
@Евг нийКондратенко會扭曲'DayCount'值 – JamieD77