I have a table named cad_faltas
, it has the fields:
id int(11)
id_cad_alunos int(11)
falta varchar(8)
idcurso int(11)
The falta
field receives the data AWAY and / or PRESENT. The question is, is there any possibility of doing a count of records that are as "AWAY" for every idcurso
and also know the percentage of records with this information?
Example:
For the course of "id" 2 there are three registers like "ABSENT" that are 50% of all records for this "id" 2.