I am given a table like the following of a attendece of employees at a company. The data should be extracted from a sequenctial file which has comma seperated values.
ID | Weekday | Attendence |
---|---|---|
1 | Monday | Yes |
2 | Monday | Yes |
3 | Monday | No |
4 | Monday | Yes |
1 | Tuesday | Yes |
2 | Tuesday | No |
3 | Tuesday | Yes |
4 | Tuesday | Yes |
ID column has the employee ID and Weekday and Attendence columns has the exact meaning. I wan to count how many days the employee has shown up and I want the Days he attended as a comma seperated list. Like below
ID | Weekday_List | Attendenc_Count |
---|---|---|
1 | Monday,Tuesday | 2 |
2 | Monday | 1 |
3 | Tuesday | 1 |
4 | Monday,Tuesday | 2 |