Let's say I have 3 tables
parent table has this field:
parent_no
parent_student table has these fields:
parent_no, student_no
student table has these fields:
student_no, class_no
I'd like to know how I can select parent_no of class A?
I've tried the following statement, but duplicate record is found where 1 parent has 2 children in that class
select a.parent_no from parent a, parent_student b, student c where c.class_no='classA' and c.student_no=b.student_no and
b.parent_no=a.parent_no