I have two tables pdc and class
x
select roll_no as roll,sum(pdc.amount) as amount,count(amount) as given,
stu_profile.name,f_name,scholarship,class_id,batch_id,statuss
from stu_profile left join
pdc
on pdc.roll=stu_profile.roll_no
where 1 and class_id!='' and given=0
group by roll
I want a condition on count (amount) column
Advertisement
Answer
Use having
clause instead
. . .
having count(amount) = 0;