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 |
in which situations do u go for sequence generator ?
How You Pull the records on daily basis into your ETL Server.
how can i invoke pmcmd in command line prompt
What is the expected value if the column in an aggregator transform is neither a group by nor an aggregate expression?
What is critical mapping?
can you use flat file for lookup table?why?
There are 4 source files which contains same metadata create target that should display the file name along with record please send answer with mapping
List the transformation in informatica.
Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?
How to load last 10 records of flat file in to the target?
What is dimensional table? Explain the different dimensions.
what is mapping override?