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

difference between shortcut and reusable transformation?

2 Answers  


Explain pushdown optimization and types in informatica

0 Answers   Informatica,


how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me

16 Answers   Cap Gemini, IBM,


What is a difference between complete, stop and abort?

0 Answers  


What do you understand by term role-playing dimension?

0 Answers  


in reporting we add some new objects,how we get the count of the newly added objects to the report

0 Answers   HP,


In ur current projectu have done any performance tuning of mappings?

1 Answers  


How can we trouble shoot the commas in a column of a comma delimited flat file in Informatica

1 Answers  


How to load data into 3 target tables which are in different schema but with the same name and same relational connection at infromatica level ? How to differentiate while loading ? and how to load ?

2 Answers   IBM,


what is worklet and what use of worklet and in which situation we can use it?

4 Answers   Patni, TCS,


Explain the mapping variable usage example in informatica

0 Answers   Informatica,


write a query for how to eliminate the duplicate rows without using distinct?

6 Answers   iGate,


Categories