The specific question is select rollno from class table who where present in dbms and not present in maths.
rollno sts sub
1 1 dbms
1 0 maths
2 1 dbms
2 0 maths
3 0 dbms
3 1 maths
4 0 dbms
4 0 maths
5 1 dbms
5 1 maths