Assuming this is possible, I'm looking for a method(MYSQL query) to join tables where none of the values returned are duplicated. I would like to join three tables (A, B, C). The common column among the three tables is the user_id. The user_id will be unique in Table A - users will only have one row/record in Table A. However, the user_id will not be unique in Tables B & C - users may have several records/rows in both tables B & C. I've tried INNER, LEFT, and RIGHT JOINS, as well as UNION However, it duplicates the results from Table A to match with the results from Table B & C.
Row 1: Value1(from A) Value1(from B) Value1(from C)
Row 2: Value1(from A) Value2(from B) Value2(from C)
Row 3: Value1(from A) Value3(from B) Value3(from C)
I want to avoid this. Instead I would prefer:
Row 1: Value1(from A) Value1(from B) Value1(from C)
Value2(from B) Value2(from C)
Value3(from B) Value3(from C)
Row 2: Value2(from A) Value1(from B) Value1(from C)
Value2(from B) Value2(from C)
Value3(from B) Value3(from C)
Thanks in advance for any help.