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 / nunna
Query to find duplicates in a table:(Custname, Prod,
Order_amt)
select custname,count(*) from sales1 a where a.rowid > ANY
(select b.rowid from sales1 b where a.custname=b.custname
and a.prod=b.prod and a.order_amt=b.order_amt) group by
custname;
Query to delete duplicates:
delete from sales1 a where a.rowid > ANY (select b.rowid
from sales1 b where a.custname=b.custname and a.prod=b.prod
and a.order_amt=b.order_amt);
| Is This Answer Correct ? | 7 Yes | 15 No |
Post New Answer View All Answers
How would you load a very large file in teradata in general? What utility would you use for it? Why?
Explain the new features of teradata?
What is smp and mpp platforms?
if collect stats but it show low confidence why?
What is difference between user and database in teradata?
What are the 5 phases in a multiload utility?
How is MLOAD Client System restarted after execution?
Explain teradata architecture in detail with a diagram.
What is database exceptions in teradata?
What is a sparse index?
What is the command in bteq to check for session settings ?
What are default access rights in teradata? What explicit right can be given to a user?
What are the main components of teradata system?
What is spool space?
What is the function of parser component in teradata?