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

One of the optimizing technique to improve the session performance is push down optimization,by using push down optimization we push as much as transformation logic to source/target database,but this degrades the d/b performance,how to overcome this?

2263


What is mapping debugger?

1016


What is transformation?

1099


What are the differences between a connected lookup and unconnected lookup?

1070


differences between service based and product based?

2014


Plz can any one say me how to get the informatica certification materials and dumps

2050


How can you increase the performance in joiner transformation?

1190


Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?

1676


Can we create a Integration service without a Repository service and vice versa?

1215


How to extract the informatica rejected data?

1221


Enterprise data warehouse your projects phase by phase explain?

1921


Explain the features of connected and unconnected lookup.

935


Mine is Insurance Domain, So interviewer asked about terms like underwriting, disbursement amt, Reinsurance

2012


Explian the Process of deployment groups in informatica

1062


How will the document be delivered to me?

1085