1

Lets say I have 2 columns, a and b.

Column A contains these values:

a
b
c
d

Column B contains these values:

e
d
c
b
a

What can I do to get the absolute distinct values from BOTH columns?

Meaning if i want to have a count on both columns, the result is to be 5. Because a, b, c and d are repeated in column B but not e.

1 Answer 1

3
SELECT A
FROM YourTable
UNION
SELECT B
FROM YourTable
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.