I have 2 rows of data in a mysql database. Both rows are identical with the exception of one column. What I am looking for is a query that will produce a single row with both distinct values. Can someone please help me out?
An example of the data is:
1 Administrator Test 2009-08-17 03:57:35
1 Miller Test 2009-08-17 03:57:35
What I need is this:
1 Administrator Miller Test 2009-08-17 03:57:35
DISTINCT won't give it to me. I need the additional column added or appended to the result set.
This is the code I am trying to use.
SELECT
t2.msg_id,
t3.lname AS sender,
t4.lname AS recipient
FROM
mail_message AS t1
Inner Join mailbox AS t2 ON t1.msg_seq = t2.msg_seq
Inner Join employee AS t3 ON t3.employee_id = t2.employee_id
INNER JOIN employee AS t4 ON t3.employee_id = t4.employee_id