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

when we use dynamic lookup,if condition matches what will be the o/p?

2 Answers   L&T,


I have 1200 records how can u send it in aggregator with good performance issues?

3 Answers  


Sequence generator, when you move from develoment to production how will you reset

0 Answers  


what is persistent lookup cahce?how to use and when to use this persistent lookup cahce?explain?

0 Answers  


what is mapping override?

2 Answers   Cap Gemini,






Is LOAD MANAGER AND LOAD BALANCER same in informatica?

1 Answers   KPIT,


we have table like cust_id,cust_name,cust_loc like this 1.we need to get perticular location,to do this we can use filter transformatin,that logic is same for relation table and flat file tabl?

2 Answers  


what is the gap analysis?

1 Answers  


Explain one complecated mapping?

3 Answers   Fidelity, Wipro,


Suppose i have 10000 records.First time i have to load 1 to 1000 records and second run i have load 1000 to 2000 records and third load i have to load 2000 to 3000 rows .How will achieve

15 Answers   TCS,


Useful UNIX commands regular/frequently used

1 Answers   Deloitte,


what is meant by data driven.. in which scenario we use that..?

2 Answers   IBM,


Categories