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 will be the approach?

571


How to use pmcmd utility command?

574


What is the difference between SOURCE and TARGET BASED COMMITS? What are the deliverables?in your project?

1622


What do you mean by DTM and Load manager and what is difference between load manager and load balancer?

624


Which version configuration tool used in ur project?

2760






Whats there in global repository

1255


what is the -ve test case in your project.

1842


What is the need of an ETL tool?

631


Explain the scenario which compels informatica server to reject files?

648


In how many ways we can create ports?

695


What is meant by pre and post session shell command?

610


what is Active lock explain

2360


What does role playing dimension mean?

615


HAI FRIENDS THIS KISHORE FROM KUMBAKONAM. I HAVE COMPLETED MY MCA IN SASTRA UNIVERSITY WAITING FOR MY 6 TH SEM RESULT.DURING MY PROJECT I HAVE DONE INFORMATICA COURSE AS MY AREA INTEREST COURSE IN CORE MIND TECHNOLOGIES CHENNAI.I HAVE ENQUIRY ABT ALL IT PEOPLE FOR DATAWAREHOUSING THERE IS NO OPENING FOR FRESHERS. WITH SOME EXPERIENCE ANY OTHER DOMAIN TNEN ONLY U CAN GET THAT DOMAIN(DATAWAREHOUSING) JOB.BUT I AM MORE INTEREST ON THAT TO WORK ON THAT DOMAIN(INFORMATICA).WHAT TO I DO. I AM IN HELPLESS FRIENDS/EXPORTS.WAITING FOR REPLY

1677


Can we use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

593