newbie26 Junior Poster 108 posts since Sep 2011 Reputation Points: 0 [?] Q&As Helped to Solve: 1 [?] Skill Endorsements: 0 [?] 0 6 Months Ago hi.please help me with mysql query. i have a table tblGrades with fields ID, Subject, Remarks. how can i create a stored procedure that will display the students that have subjects(user input) and Remarks='Passed'? the Subjects will depend on the user, therefore it may be one or two or three subjects, etc they want and all are 'Passed'. i was able to make the query like this: select * from tblGrades where Remarks='Passed' and Subjects in('English',Science') group by ID having count(*) ='2' the results are those students who Passed BOTH ENGLISH and SCIENCE. but what if the user chose ENGLISH, SCIENCE, MATH and others? please help. thanks..