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 are the various etl tools in the market?
How to eliminate product joins in a teradata sql query?
What is a clique?
What is multi insert?
tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you
Why do you get spool space errors? How do trouble-shoot them?
What do you mean by tpt in teradata?
Explain fastload in teradata?
What are differences between teradata and ansi session modes in teradata?
What is the purpose of using case expression in teradata?
What are the different functions included in the server software?
What do you mean by ttu in teradata?
What do high confidence, low confidence and no confidence mean in explain plan?
Explain the most common data types used in teradata?
How to select first n records in teradata?