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

Are semicolons required at the end of sql statements in sql server 2005?

995


What is acid properties?

1103


What is table-valued sub query?

973


which backup strategy you are following at ur company

2149


What is the difference between ‘having’ clause and a ‘where’ clause?

1041


How do I find the port number for sql server?

972


Can we perform backup restore operation on tempdb? : sql server database administration

1001


Explain the first normal form(1nf)?

1030


How to rebuild the master database?

1082


If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security

1039


What is normalization and denormalization in sql server?

1020


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

1216


How do I find the transaction log size in sql server?

964


Which joins are sql server default?

1014


How to verify the port number of the sql server?

1168