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
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 |
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 |
Explain what transformation and how many are there in informatica?
Separate from a database, an information bazaar, and an information stockroom?
Define mapping and session?
Does Facttable Normalized or Denormalized?
How many input parameters can exist in an unconnected lookup?
How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.
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 ?
Explain the use of aggregator cache file?
What is deployment group?
I am Unable to load the FixedWith FlatFile Into The Target.What Is The Reason. PLZ Help Me..
I have a flat file, want to reverse the contents of the flat file
What are the uses of a Parameter file?