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 sql query following table some duplicate present
1
1
2
2
3
3
4
5

i want the output unique one column duplicate another
column following format like

unique duplicate
1 1
2 2
3 3
4
5

Answer Posted / nagarau puppala

select distinct country_id "unique", (case when count(country_id) > 1 then country_id else null end) "duplicate" from s_region
group by country_id order by duplicate;

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is informatica powercenter repository?

1204


What are the limitations of joiner transformation?

1114


How to implement security measures using repository manager?

1182


what is granularity,what type of granularity we will take in fact tables either lowlevel or highlevel,if two tables having same granularity that is posiable or not

2341


Quickly characterize reusable change?

1123


The question was on time stamp. what is the difference between HH and HH24 when to use when.

2060


How many ways are there to do 'remove duplicate records in informatica'?

1018


How can we use batches?

1026


Suppose we have a source qualifier transformation that populates two target tables. How do you ensure tgt2 is loaded after tgt1?

1092


Repository user profiles

1767


What is resilience time?

1148


Explain pmcmd command usage in informatica

1139


What is rank index in rank transformation?

1080


Describe expression transformation?

1132


What are the issues you have faced in your project? How did you overcome those issues?

2365