MYSQL - Having trouble with query involving multiple tables -


i need writing query find name of students enrolled in course taught professor wrote article called "x"

i have code find professor wrote article, i'm having trouble joining tables find names of students enrolled in course taught prof.

select first_name, last_name, title) intellectual_contributions ic, ic_contributors icc, stakeholders s title ="x" , ic.ic_id=icc.ic_id , icc.stakeholder_id=s.stakeholder_id 

you need more inner join's. also, try use joined syntax.

select aa.first_name, aa.last_name, cc.title stakeholders aa inner join ic_contributors bb on aa.stakeholder_id = bb.stakeholder_id inner join intellectual_contributions cc on bb.ic_id = cc.ic_id inner join course_enrollments dd on aa.stakeholder_id = dd.stakeholder_id cc.title = "x"; 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -