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 / akash khanwalkar
This one is without using HAVING clause:
SELECT TEMP.ID, TEMP.ID_COUNT FROM
(
SELECT ID AS ID, COUNT(ID) AS ID_COUNT FROM TEMP_ID_TABLE
GROUP BY ID
) TEMP
WHERE TEMP.ID_COUNT > 1;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
In informatica workflow manager, how many repositories can be created?
How to create different types of slowly changing dimensions (SCD) in informatica using the mapping wizard?
What are the popular informatica products?
How to generate sequence numbers?
I have done MBA in 2008. i got job as business analyst in 2008 january through consultany. but after 3 months they are giving training Informatica developer. now iam continuing this job. my question is when iam going to interview HR people ask me many times like this " YOU ARE MBA GRADUATE. HOW YOU ARE SELECT THIS POSTION. IAM EXPLAINING WHAT I HAVE MENTION ABOVE". PLEASE TELL HOW IAM TELLING THIS QUESTION ANSWER.
What is the Process to creating lookup transformation in informatica
How to extract sap data using informatica? What is abap? What are idocs?
What is decode in informatica?
What does “tail –f” command do and what is its use as an Informatica admin.
What is the use of an aggregator cache file?
What is update strategy transform?
How to do unit testing in informatica?
Informatica Server and Client are in different machines. You run a session from the server manager by specifying the source and target databases. It displays an error. You are confident that everything is correct. Then why it is displaying the error?
what is the Default Source Option For Update Strategy Transformation?
I have worked on Informatica 7.1.1. I want to know the answer for the below question. Target is not created initially.Then how to take the DDL script from the source and run the Mapping by creating the Target dynamically?Is it possible by SQL Transformation?