To generate the list of students USN whose attendance is less than 75% along with the attendance percentage and subject code in which they have shortage, when I run the following query I am getting error. Where am I doing wrong? Can you correct it?
select attendance.usn,avg(attendance.ispresent),schedule.subcode
where avg(attendance.ispresent) in
(select avg(attendance.ispresent) having avg(attendance.ispresent)<0.75);