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 / pradip jain

Himesh is also correct with little change..

select top 1 region,count(*) e
from t2 JOIN t1 ON (t1.eid = t2.eid and
t1.[T-Shirt_Size] = 3)
group by region
order by e desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about Joins?

1037


What is the meaning of sql server?

1037


How to insert data with null values?

1082


What is the advantage of sql server?

1080


What is bookmark link in ssrs?

251


Explain ms sql server reporting services vs crystal reports?

975


Explain what is raid and what are different types of raid levels?

1091


What is the difference between varchar and varchar types?

1121


What is inner join? Explain with an example?

1286


Explain the concept of view and Types of views in SQL server?

1035


what’s the difference between Covering Indexes and Clustered Indexes ? how to use clustered index small ?

2027


What are the different SQL Server Versions you have worked on?

1060


A trigger can reference objects outside the current database? State true or false.

1060


How do you size a resultset?

967


What is the difference between char and varchar2 datatype in sql?

1123