write s sql query following table some duplicate present i
want unique one column duplicate another column display?
name id
a 1
a 1
b 2
b 2
c 3
i want the required output like
unique duplicate
name id name id
a 1 a 1
b 2 b 2
c 3
Answer Posted / senthil
select a.nameid as unique_name_id,b.nameid as DUplicate_name_id
from
(select distinct nameid from name) a
left outer join
(select nameid from name group by nameid having count(*) > 1) b
on a.nameid = b.nameid
Output:
---------
unique_name_id Duplicate_name_id
a 1 a 1
b 2 b 2
c 3
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different lookup cache(s)?
EXL informatica Questions
Differences between version 7.x and 8.x.
Explain how many types of dimensions are available in informatica?
Describe the impact of several join conditions and join order in a joiner transformation?
What are the issues you have faced in your project? How did you overcome those issues?
What are the static cache and dynamic cache in informatica?
Enlist some properties of sessions.
In which transformation you cannot drag ports into it?
To import the flat file definition into the designer where should the flat file be placed?
Explian the Process of deployment groups in informatica
What are the transformations that cannot be placed between the sort origin and the joiner transformation so that we do not lose the input sort order?
What is workflow? What are the components of the workflow manager?
what is mean by complex business rule ?
What are the different versions of informatica?