I'm quering employees who participated in activity1 and activity2. I'm getting output as following. I would like to convert these two rows into one.
employee_number activity1 activity2
1 yes no
1 no yes
The same employee did activity1 and activity 2. However, it's showing in two separate rows. It's because I have a case statement as follows
select employee_number,
case when activity1 = 1 then 'Yes' else 'No' end activity1,
case when activity2 = 2 then 'Yes' else 'No' end activity2
from report_data
I need to see the output as below
employee_number activity1 activity2
1 yes yes
Please let me know as how can I get the above output.
Thanks in advance!