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 is informatica? Why do we need it?
What is the different lookup cache(s)?
Does an informatica transformation support only aggregate expressions?
Explain lookup transformation source types in informatica
Explain sessions?
Where can we find the throughput option in informatica?
Can we get 1st record through Informatica(without sequence number).
can any one give some examples for pre sql and post sql(Except dropping and creating index).
How might one distinguish in the case of mapping is right or not without associating session?
What is mapping debugger?
How to generate sequence numbers?
How we can create indexes after completing the loan process?
Suppose we do not group by on any ports of the aggregator what will be the output?
Define enterprise data warehousing?
How do you migrate data from one environment to another?