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

Enlist the differences between database and data warehouse.

0 Answers  


Why can't we connect 2 active transformations to an active transformation ? Ex:- One aggriagator and one sq trans to an router transformation

1 Answers   Puma,


suppose if we have dublicate records in a table temp n now i want to pass unique values to t1 n dublicat values to t2 in single mapping?how

4 Answers   CTS,


My Source qualifier has empno, sal. Now my mapping is like SQ(EMPNO)->AGGR->EXP->TARGET SAL ------------>TARGET ? Is this mapping valid or any issues are there if we design like this?

3 Answers   Span Systems,


what is galaxy repository?

2 Answers  


how to run workflow in unix?

5 Answers   Colgate, HP, Tech Mahindra,


How can yoU create or import flat file definition in to the warehouse designer?

2 Answers  


How many joins in Informatica

5 Answers   CSC,


What is aggregator transformation in informatica?

0 Answers  


I have source like this 1:2;3. so i want to load the target as 123

4 Answers   HP,


What is difference between stored procedure transformation and external procedure transformation?

2 Answers  


Source as 1 1 2 2 3 3 How to get target as 1 2 3 and 1 2 3

3 Answers   CTS,


Categories