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

Answers were Sorted based on User's Feedback



write a sql query following table some duplicate present 1 1 2 2 3 3 4 5 i want the out..

Answer / babu

Hi,
SELECT DISTINCT(DEPTNO) UNIQ,E.DUP FROM EMP
LEFT OUTER JOIN
(SELECT DEPTNO DUP FROM EMP GROUP BY DEPTNO HAVING COUNT
(DEPTNO)>1) E
ON (EMP.DEPTNO=E.DUP)

please correct me if any thing wrong.

Thanks,
Babu

Is This Answer Correct ?    2 Yes 0 No

write a sql query following table some duplicate present 1 1 2 2 3 3 4 5 i want the out..

Answer / 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

More Informatica Interview Questions

list out all the transformations which use cache?

0 Answers   Informatica,


can u apply SCD2 on flat file tgt? if yes wat is the procedure?

3 Answers   Deloitte,


How to join three sources using joiner? Explain though mapping flow.

0 Answers  


What is the main data object present inbetween source and target. I answered Mapping. Transformation etc.. But it is not the answer. So please give me an apt answer. Thanks in advance

15 Answers   Deloitte,


how we can add header and footer to flat files?

2 Answers   Tech Mahindra, Zensar,


what is materialized view?

2 Answers  


How to load data in informatica ?

0 Answers  


What are the tasks that source qualifier perform?

0 Answers   Informatica,


can you use flat file for lookup table?why?

2 Answers   HCL,


How to display session logs based upon particular dates. If I want to display session logs for 1 week from a particular date how can I do it without using unix. ?

0 Answers   CTS,


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

0 Answers  


what are the difference between Informatica 7.1 and 8.1?

6 Answers  


Categories