I have table of Person having multiple Attributes, and I want to join them so I get result like this:
First_Name | Last_Name | Attribute
======================================================
John | Smith | Cool, Tall, Brown Hair
Steve | Bob | Impatient, Short, Blonde Hair
Hector | Hector | Groovy, Funny, Black Hair
The tables are:
Person {id, first_name, last_name}
Attribute {id, description}
Ref_Attribute {id, ref_person_id, ref_attribute_id}
I know I can use GROUP_CONCAT and at the end use GROUP BY person.id, but I don't want to use GROUP BY, because I need to join with another table which I need to separate them as different row. The table to join is House. Which means, if a Person have multiple house, then it will give:
First_Name | Last_Name | Attribute | House
=======================================================================
John | Smith | Cool, Tall, Brown Hair | Bourke St. Ave
Steve | Bob | Impatient, Short, Blonde Hair | Flinders St.
Hector | Hector | Groovy, Funny, Black Hair | Crown Golf
Is there any way I can join and get the result without GROUP BY?