The table below was created from another table with columns ID,Name,Organ,and Age. The values found in the Organ column were codes which designated both organ and condition.
Using CASE I made a table like this:
--------------------------------------------------------
ID NAME Heart Brain Lungs Kidneys AGE
1318 Joe Smith NULL NULL NULL NULL 50
1318 Joe Smith NULL NULL NULL NULL 50
1318 Joe Smith NULL NULL NULL Below 50
1318 Joe Smith NULL NULL NULL Below 50
1318 Joe Smith NULL NULL Above NULL 50
1318 Joe Smith NULL NULL Above NULL 50
1318 Joe Smith Average NULL NULL NULL 50
1318 Joe Smith Average NULL NULL NULL 50
--------------------------------------------------------
I would like to query this table and get the following result:
--------------------------------------------------------
1318 Joe Smith Average NULL Above Below 50
--------------------------------------------------------
In other words I would like to create one record based on the unique values from each column.