我喜欢这张我对集团明智摘要SQL代码
Attendance
----------
Studentid | Date | Status
--------------------------------
1 | 2017-01-01 | Present
1 | 2017-01-02 | Present
1 | 2017-01-03 | Absent
1 | 2017-01-04 | Presnt
2 | 2017-01-01 | Absent
2 | 2017-01-02 | Present
2 | 2017-01-03 | Absent
2 | 2017-01-04 | Presnt
我想写一个MySQL查询得到这样的输出。
StudentID | PresentCount | AbsentCount
1 | 3 | 1
2 | 2 | 2