I am having a table with columns
ID NAME
1 x and the requirement is to get the o/p like this
1 y ID Count(*)
1 z 1 3
2 a 2 2
2 b
3 c
so write a sql query to get the id n how many times its
count of repetition n there u shouldn't get the distinct(i.e
id-3)

Reply as early as possible

Answer Posted / sambu

select id,count(*) from <table name>
group by id having count(*)>1;

The above gives us desired output

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In What Situations we can use MappingParameters ,Mapping Variables AND Session Parameters in REAL TIME.

1527


What are the basic requirements to join two sources in a source qualifier transformation using default join?

606


What are the types of caches in lookup?

560


Describe the scenarios where we go for joiner transformation instead of source qualifier transformation?

608


Define the various join types of joiner transformation?

555






What are the transformations that are not supported in mapplet?

589


What are the performance considerations when working with aggregator transformation?

667


what is the size of u r source(like file or table)?

1808


what is mean by complex business rule ?

1712


To Provide Support For Mainframes Source Data, which Files Are Used As A Source Definitions?

666


What is complex mapping?

628


Hello , I am unable to work with SQL transformation at least. Where do i need to give connection for sql transformaton ? At session level there is no property . I have created a SQL Transformation and chosen query mode. But do i need to pass connection information to it ? I don't know where do i need to write a query ? I have written a query in file and that file path i gave in the properties of SQL Transformation. But it is not working. Could any one of you please let know how can i work with SQL Transformation? Advance Thanks.

2313


What is InformaticaPowerCenter?

679


What is a surrogate key?

555


Which transformation should we use to normalise the COBOL and relational sources?

736