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

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

2087


What are the things to be considered while creating secondary index?

1140


What is spool space?

1221


What happens when a node suffers a downfall?

1187


Can you connect multiload from ab initio?

1280


tomorrow i have interview in infosys.can someone pour any suggestions or any interview questions. thank you

901


In general, how do you optimze any sql in teradata?

1085


what is object level locking ? where do appear this type of locking ?

3538


How many codd's rules are satisfied by teradata database?

1149


What are the frequently used data types in teradata?

1132


what is sysdba and sysdbc ? which has high priority ?

3883


What is called partitioned primary index (ppi) and discuss the advantages of using it in a query?

1075


What is the command in bteq to check for session settings ?

1232


What are the available primary index types in teradata.

1078


How many types of joins are there in teradata?

1021