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 purpose of self join?

981


What are indexes in ms sql server?

1066


How many tables can be joined in SQL Server?

1069


What is sql view?

1050


How to delete duplicate rows?

1004


What is rs.exe utility?

160


What is default constraint?

1006


how to invoke a trigger on demand? : Sql server database administration

1091


How to connect a database with sql express.?

1071


How can we improve performance by using SQL Server profiler?

1058


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

1057


What is the difference between count and distinct count?

891


What are cascading parameters in ssrs reports?

234


What is sub-query in sql server? Explain its properties.

1100


Explain stored procedure?

1060