Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

can anybody send me some real time screenshots of mapping in informatica powercenter. i will be vary thankful to him. my e-mail id :- prakashkumar.kumhar@gmail.com

4727


What is the difference between stop and abort in informatica

1095


What is the difference between writing a joiner query in ANSI style and THETA style?

2377


What is data caches/ index caches?

1100


What is native users?

1153


How identifying bottlenecks in various components of informatica and resolving them?

1132


Clarify the utilization of aggregator cache record?

996


Hi, I want to do Informatica Designer certification. Can anyone help me by providing the details on this. Thanks in advance. Regards, Arnab

2166


What is the need of etl tools?

1117


What are active transformations.

1653


What is mapplet in informatica?

1056


How many number of sessions can one group in batches?

1157


Write the unconnected lookup syntax?

1084


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?

1903


How will the document be delivered to me?

1085