Friday, 23 August 2013

Mysql custom where condition

Mysql custom where condition

My table is :

I want to select records who all are fail(result=0) but except who has
same course_id result is 1.
For example look my table there are two rows have result=0 but
student_id=1 has another row with result=1 so i want skip this record.
Sorry for confusing you.I hope my expecting output explains clearly what I
want.
Expecting output is :
2 | 1 | 0

No comments:

Post a Comment