teradata SQL query

Database

teradata SQL query

Hi, can any one help me giving the code to this query?

I have a Customer table which have duplicate rows. In that table

I. I want only unique rows.

2. I want only Duplicate rows ( if in Table unique rows exist, i don't want them to display)

Thank you

Meena

2 REPLIES
Enthusiast

Re: teradata SQL query

You can create table as  with data with a select query something like this:

select id,id1..... from your_table

qualify row_number() over(partition by id,id1..... order by id,id1.....)>1 or =1

Re: teradata SQL query

Thank you Raj,

I Will try it.