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 various etl tools in the market?

1069


How to eliminate product joins in a teradata sql query?

1014


What is a clique?

1080


What is multi insert?

1045


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

823


Why do you get spool space errors? How do trouble-shoot them?

1051


What do you mean by tpt in teradata?

1019


Explain fastload in teradata?

1095


What are differences between teradata and ansi session modes in teradata?

1168


What is the purpose of using case expression in teradata?

1009


What are the different functions included in the server software?

1027


What do you mean by ttu in teradata?

1031


What do high confidence, low confidence and no confidence mean in explain plan?

1043


Explain the most common data types used in teradata?

1056


How to select first n records in teradata?

1098