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

What are the ways available in sql server to execute sql statements?

1037


What is bcp? When does it use?

868


What is relationship? What number of sorts of relationship are there?

1062


How to check table values in sql server?

908


What is store procedure? How do they work? When do you use?

885


What is coalesce in sql server?

992


Does view occupy space?

884


Can you tell me some of the common replication dmv's and their use? : sql server replication

869


Explain what are the restrictions while creating batches in sql server?

1020


Tell me about normalization in DBMS.

944


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

887


Define candidate key, alternate key, and composite key.

868


What is a scheduled job or what is a scheduled task?

910


Do you know sql server 2008 introduces automatic auditing?

901


How do you set a trace flag in sql server?

995