My attendance table has the following fields:
attendance
studentID,
cDate,
isPresent
The isPresent field contains 1 for present, 0 for absent.
I need a pivot query for final attendance report that will have header
studentID, date1, date2, date3..., total
and each data row will contain something like:
St001, 1,1,0,1... 3
date1, date2 etc. will be found from the data.
Now I am exporting the data into an excel file for the report.
But I want to do it in MySQL.
Can anyone help me on creating the pivot query.
I read many articles on it but with not much clear conception.