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

A Flat file located in unix source folder. data transfer every day 8 am. can ask 5 question for above scenario validation. recently i have faced this question.

1 Answers   TATA,


What are mapplets?

0 Answers  


how will you remove the duplicate records from flat file without using sorter?

7 Answers  


in unconnected lookup , what are the other transformations , that can be used in place of that expression transformation ?

9 Answers   Target,


Difference between STOP & ABORT in Informatica.

3 Answers   Accenture, Wells Fargo,


(Integ) Start workflow: ERROR: User [practice] does not have sufficient privilege for this operation. how to solve this pls suggest me? THANKS in advance

1 Answers  


How to do the error handling of if ur source is flatfiles?

0 Answers  


Mine is Insurance Domain, So interviewer asked about terms like underwriting, disbursement amt, Reinsurance

0 Answers   TCS, Wipro,


a soure table has 100 records how to load into 3 target tables in a cumulative order source target1 target2 target3 --------- ------------------------------------- 1-100 1 2 3 4 5 6 - - - 98 99 100

2 Answers   Cap Gemini,


How to load the data from a flat file into the target where the source flat file name changes daily?

0 Answers   Informatica,


tell me the push down optimization

2 Answers   Wipro,


What is the query to find nth highest salary? What is the use of cursors?

8 Answers   Keane India Ltd,


Categories