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...

can any one answer this query,thank you in advance

Table 1 has 2 columns: EmployeeId, T shirtsize(values can
be 1,2,3)
Table 2 has 2 columns: EmployeeId, Region
Write SQL to Find the region which has the largest number
of people with Tshirt size=3

Answer Posted / ashok

select b.Region, a.TSize, Count(a.TSize)
as TSizecount from Table1 a,Table2 b where a.Empid =
b.Empid and a.TSize=3 group by region, TSize order by
Region, count(*), TSize desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which Model uses the SET concept

979


Can you index views?

888


what are the different types of SSRS reports?

151


what is raid? : Sql server database administration

1017


How do I view a script in sql server?

1027


What is the difference between locking and multi-versioning?

973


What are the different types of Indexes available in SQL Server?

982


How exceptions can be handled in sql server programming?

994


What is an index in sql?

988


Why do we backup Active Directory ?

1028


When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?

1081


Write a SQL command to insert and update only a particular field?

1087


What can be used instead of trigger?

1130


How to provide values to user defined function parameters?

997


How to replace given values with null using nullif()?

968