I have three tables
student: id int (pk), name varchar(255)
discipline: id int (pk), name varchar(255)
student_discipline: student_id int, discipline_id int
I know that this has something to do with many-to-many relationship, and more than one joins are necessary, but i'm very new to sql, so my question is:
How can i make a query that returns only students with 'John' as starting name that have 'Math' as discipline, but only the student id and the student name, for example ?
Any help is appretiated !