0
SELECT DISTINCT COL_A, COL_B, COL_C, COL_D, from Table_E

If I want to only consider COL_A's duplication, how to use DISTINCT properly only for the COL_A?

1 Answer 1

1

Use DISTINCT ON:

SELECT DISTINCT ON (COL_A) COL_A, COL_B, COL_C, COL_D FROM Table_E;

See:

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.