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 |
How the informatica server sorts the string values in Rank transformation?
Hi, Can you please send me the Informatica 8 certification exam dumps to my email id rwork.san@gmail.com Thanks, Revathi.
What are the different options available for update strategy?
How to load the source table into flat file target(with columns) in informatica?
Why do you use Mapping Parameter and mapping variable?
following scenario i have 1000 record flatfile source i want ist row to ist target 2nd eow to 2nd target 3rd row to 3rd target how will u do?
HOW TO PROCESS THE ROWS FROM JOINER AND EXPRESSION TRANSFORAMTION TO SORTER TRANSFORMATION
my source is like this id,name sal 10 abc 1000,10 pqr 2000, 10 xyz 3000 ,10 jkl 4000 and my requirement is like this 10 abc,pqr,xyz,jkl 2000 .... i have try for this by using expression transformatin its ok of the concatenation of second column but the thing is that on third column if u group by using agg t/r the last value will com i.e 4000 but i asked by a interviewer that i dont want the first or last column i want the middle column i.e 2000 .plz reply for the same
we have three columns and two rows. col1 col2 col3 a b c want to change into 2 columns and 3 rows ,how? col1 a col2 b col3 c which transformation u'll use and how?
What is lookup change?
I have a flat file, want to reverse the contents of the flat file
What are the hard ware required for a normal sized data warehouse? and What are the software required for a normal kind of data warehouse?