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

select top 1 region,count(t2.eid) a
from t2
join t1 on t1.eid=t2.eid
group by region,[T-Shirt_Size]
having [T-Shirt_Size]=3
order by a desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest version of microsoft sql server?

1026


How to get @@error and @@rowcount at the same time?

1018


explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration

1046


Explain about Normalization?

1042


Mention the 3 ways to get a count of the number of records in a table.

965


Tell me about joins in database system and explain each in detail.

1033


What happens if null values are involved in string operations?

972


Define Unique Key?

987


Which tools are available to manage SQL Azure databases and servers?

115


How to create user messages with print statements in ms sql server?

973


What happens if null values are involved in comparison operations?

949


What is report snapshot in ssrs?

264


You want to implement the one-to-many relationship while designing tables. How would you do it?

942


How to stop log file growing too big?

1000


What are Row versions of DataRow?

1008