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 / susanna

select top 1 Count(r.Empid) as Ct,r.regionId from Emp_Region
r inner join Emp_Tshirt t on r.Empid= t.EmpId
where t.T_size=3 group by r.regionId order by Ct desc

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When you should use a low fill factor?

982


How to create new table with "create table" statements?

1071


How to delete a database in ms sql server?

1207


What is read uncmmited?

1041


What is difference between delete & truncate commands?

1062


How to modify the underlying query of an existing view?

972


What is a join in sql? What are the types of joins?

1075


Do you have any idea about the tcl commands?

949


what are candidate key, alternate key and composite key? : Sql server database administration

897


How to filter records of table in SQL SERVER?

1065


What are the mathematical functions supported by sql server 2005?

1048


what is a check constraint?

1075


What is single-user mode?

915


How to configure odbc dsn with different port numbers?

1071


Hi all, can any one please tell me the difference between sql server 2008 and orace 9i

1933