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

Tell me when is the update_statistics command used?

1202


What is rs.exe utility?

164


What is for xml in sql server?

1140


how to trace the traffic hitting a sql server? : Sql server database administration

1956


How to execute multiple stored procedures at one time in sql server?

1067


What is the datatype of rowid?

965


What is coalesce in sql server?

1104


What is @@error in sql?

1109


What is sql azure database?

206


How to delete all rows with truncate table statement in ms sql server?

1047


Why it is recommended to avoid referencing a floating point column in the where clause?

1017


explain what is raid and what are different types of raid configurations? : Sql server database administration

1056


How do you use a subquery to find records that exist in one table and do not exist in another?

1090


What is difference between inner join and full join?

1115


What is SQL Azure Fabric?

112