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
what are the best practices to extract data from flat file source which are bigger than 100 mb memory?
write a query to retrieve the latest records from the table sorted by version(scd)
Explain lookup transformation in informatica
What are the conditions needed to improve the performance of informatica aggregator transformation?
What are junk dimensions?
I have 10 columns in a flat file and 10 rows corresponding to that columns. I want column number 5 and 6 for last five records. In unix as well as informtica.
What do you mean by channel change?
In informatics server which files are created during the session rums?
What are roles and groups and benefits of using them?
Is it possible to create multiple domains on a single Informatica server?
How would you join a node to the already existing domain?
How can we handle two sessions in informatica?
explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?
Mine is Insurance Domain, So interviewer asked about terms like underwriting, disbursement amt, Reinsurance
Hi, I want to change date type char value integer value? I tried alter table tab_name modify (newcolumn newdatetype). But The columns have 10 million values(char type) so I want to load now numeric data. How it is possible? Old Values New Value(I want to load numeric data but the old value should be there in the column) Y 1 N 0 ERROR at line 1: ORA-01439: column to be modified must be empty to change datatype Please help on this. Thanks, GM