How to do this query in Joomla ?
Select student_id, ( select count(Subj_Code)
from grade b
where a.grade=b.grade and a.student_id=b.student_id) as subjectcount
from grade a where a.student_id='$student_id';
How to do this query in Joomla ?
Select student_id, ( select count(Subj_Code)
from grade b
where a.grade=b.grade and a.student_id=b.student_id) as subjectcount
from grade a where a.student_id='$student_id';
If you are looking for subquery then you need to create a new object for it. below is the example-