It gives me 3 columns and the counts are the same in both columns all the way through all 12 trainer rows.
Whatever number shows up it shows up twice in both columns.
I know how to do this with php loops but mysql queries are tougher.
So, to condense, I am trying to query the table so that not only do I get all 12 trainers grouped by their trainerid number no matter how many reports each one has done in the pb_appt table
2) within the records linked by the same trainerid number, I want for it to do a subquery of the 'status' field and count how many distinct instances of each possible standardized text response it finds.
Such that if one trainer has 78 records and in 21 records the status field holds 'Booked',in 32 records the status field holds 'Unbooked', and 25 hold 'Not interested' I will get separate count columns for each different response in the status field.