これは私のMySQLテーブルです:
_______________________________________________
Id | Name| Employee id | Date | Attendance
_______________________________________________
1 | xyz | 196 | 2013-04-01 | present
2 | xyz | 196 | 2013-04-02 | present
3 | xyz | 196 | 2013-04-03 | present
4 | xyz | 196 | 2013-04-04 | absent
5 | xyz | 196 | 2013-04-05 | present
6 | abc | 197 | 2013-04-01 | present
7 | abc | 197 | 2013-04-02 | present
8 | abc | 197 | 2013-04-03 | present
9 | abc | 197 | 2013-04-04 | present
10 | abc | 197 | 2013-04-05 | present
_______________________________________________
私は従業員がほとんど出席している日を数えたいと思っています.PHPで次のような結果が欲しいです:
___________________________________________________________
Name| Employee id| Attendance | Best OR NOT
___________________________________________________________
xyz | 196 | 4 Present days |
abc | 197 | 5 Present days | This is best employees of the year
__________________________________________________________________________
これどうやってするの?