Write a single SQL to delete duplicate records from the a
single table based on a column value. I need only Unique
records at the end of the Query.
Answer Posted / manny
One need have atleast a unique column such as timestamp col
(and assumption is to keep lowest tmpstmp) OR some key col
say IPID (again keep lowest value)..
One determined - Have a nested Select on all rows (except
that key col) with group by rest of the columns + having
count(*) > 0 + aggreate MIN(key_col).
Now said that, have another outer SEL on all columsn &
do a inner join with above nested Sel .. WHERE outer
key_col <> MIN value of nested SEL..
See if it works..
| Is This Answer Correct ? | 5 Yes | 16 No |
Post New Answer View All Answers
What is basic teradata query language?
Describe the between keyword in teradata?
List out teradata data types?
how can we analyze the locks ?
Explain the term 'database' related to relational database management system?
If the PMON is not working then how do you manage and monitor all processes, resources and sessions etc.
In Teradata, what is the significance of UPSERT command?
What exactly do you know about catching in teradata?
How to find duplicates in a table?
List out all forms of LOCKS that are available in Teradata.
Explain the types of join supports by teradata?
Differentiate database data and data warehouse data?
How to Extract data from multiple legacy systems?
What are normalization, first normal form, second normal form and third normal form?
What is the primary index in teradata?