I have a table that contains 4 fields. first_client_number, first_client_email, second_client_number, second_client_email. Something like:
first_client_number | first_client_email | second_client_number | second_client_email |
---|---|---|---|
1111 | na1@na.com | 2222 | na2@na.com |
3333 | na3@na.com | 3333 | na3@na.com |
4444 | na4@na.com | 4444 | na4@na.com |
6666 | na6@na.com | 7777 | na7@na.com |
etc |
Where:
- the first client number and the second client number can be different
- the first client number and the second client number can be the same
I want to get a unique list of all emails so that I have one column that shows the client number and a second column to show the clients email address. How do I flatten the table to get my desired result?
I am querying in Oracle v.12
Thanks