I am trying to write a report where a particular record can have more than one record associated with it on another table. The problem is I want to see it for that same record in a different column so that we can see it all as a bigger picture. I have tried to use aliases but I do not know how to get the data to appear inside those columns. Below is the main query but I also want to add the information for activity value description with a different activity 'STUD' to go along with 'FINSUP'
select c.label_name, c.status, a.activity_value_desc as Financial_Support_Type, a.activity_value_desc as student_status
FROM contacts C
INNER JOIN contact_categories cc ON cc.contact_number = c.contact_number
INNER JOIN activity_values A ON a.activity_value = cc.activity_value
WHERE cc.activity = 'FINSUP'
ORDER BY c.label_name