I am executing the following query,
Select distinct a.cr_id, Case When ca.ca_vote = \'Approve\' and ca.ca_title=\'MANAGER\' Then ca.ca_email Whe
Distinct is applied to all columns, not the one which is immediately after Distinct.
Distinct
If you have several different ca_email for a cr_id, you will see them all.
ca_email
cr_id
If you don't want that, you have to come up with a rule to decide what record among the duplicates must stay.