Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the updated features of teradata?

992


In a table can we use primary key in one column and in another column both unique and not null constrains.if yes how?

1092


Hi Friends, Please send me Teradata Materials for certifications Thanks in advance !!

2094


Highlight the need for Performance Tuning.

1028


How can bottlenecks be identified?

955


How to identify ppi columns?

1100


How can you track login parameters of users in teradata?

1124


What's the difference between timestamp (0) and timestamp (6)?

1123


Backup Script was blocked then you are unable to archive the data. how do you analyze it and where do you identify ?

1902


What are the functions of a teradata dba?

1022


What is meant by a Virtual Disk?

1044


Did you write stored procedures in teradata?

1058


Differentiate database data and data warehouse data?

1053


What is the syntax for case when statement?

1055


What are the different table types supported by teradata?

893