I’ve have gone through stackoverflow for days and googled a lot but can still find the solution.
I have 2 tables profile and qualification
in the table profile
pro_id surname firstname
-------- -------- ------------
1 John James
2 King Fred
3 Paul Smith
4 Cindy Hayes
Qua_id Degree School Year
------ ------ ------ -----
1 MBA Wharton university 2002
1 LLB Yale University 2001
2 BSc Covington University 1998
2 BEd Kellog University 1995
2 Msc MIT 2011
3 MBA Havard Business School 2002
3 MSc Yale University 2012
4 BSc University of Edinburgh 2010
4 BA University of Liverpool 2009
Now what i want to achieve is this
1 John James MBA Wharton university 2002, LLB Yale University 2001
2 King Fred BSc Covington University 1998, BEd Kellog University 1995, Msc MIT 2011
3 Paul Smith MBA Havard Business School 2002, MSc Yale University 2012
4 Cindy Hayes BSc University of Edinburgh 2010, BA University of Liverpool 2009
But what i currently have is :
1 John James MBA Wharton university 2002
1 John James LLB Yale University 2001
2 King Fred BSc Covington University 1998 BEd
2 King Fred Kellog University 1995
2 King Fred Msc MIT 2011
3 Paul Smith MBA Havard Business School 2002
3 Paul Smith MSc Yale University 2012
4 Cindy Hayes BSc University of Edinburgh 2010
4 Cindy Hayes BA University of Liverpool 2009
Here is my code
Select pro_id, surname, firstname concat(degree,school,year) as qual from profile,qualification Where profile.proid=qualification.qua_id
your filed names look a little odd – qua_id should perhaps be profile_id (which I think shoudl really be user_id – ie they should both be a user id and foreign keys to a user table).