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

Is port 1433 secure?

1039


What is an inner join?

1040


What are sql server procedures?

1037


What is a deadlock and what is a live lock?

1040


Does sql server use t sql?

1071


How to override dml statements with triggers?

1275


What is the difference between for auto and for nested?

1065


Explain acid?

1141


What is a system database and what is a user database?

1140


explain databases and sql server databases architecture? : Sql server database administration

1015


How to rebuild indexes with alter index ... Rebuild?

1182


Do you know what are the ways available in sql server to execute sql statements?

1082


What are a scheduled jobs?

991


What is the difference between a function and a stored procedure?

1125


Find first and last day of current month in sql server

1080