mysql - Need to display records by joining two tables and the records should be Unique -
i have 2 tables student
, taskeffort
.
many students have worked on same tasks. particular task name of students , effort should considered.
the student table contains studentid
, firstname
, lastname
.
the taskeffort table contains taskid
, studentid
, effort
i need display taskid, first name, last name, effort, worked on particular task.
this 1 of queries tried, not working.
select t.id, s.firstname, s.lastname, t.effort taskeffort t left outer join student s on t.id = 4 , s.studentid = t.studentid
thanks in advance.
select t.id, s.firstname,s.lastname, t.effort taskeffort t left outer join student s on s.studentid = t.studentid t.id = 4;
Comments
Post a Comment