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 / karthick veerappan

select top 1 region,count(*) from table2 where empid in
(select empid from table1 where tsize=3) group by region
order by count(*) desc

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you leave a union at any time?

1107


Explain left outer join and right outer join?

1092


How to find the version of sql server? : sql server database administration

1168


How do use Having,Group by,Group function in SQL?

1789


What are the different types of stored procedures?

1155


How to search for a string in all stored procedure in sql server?

1054


What is amo? : sql server analysis services, ssas

1136


Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many

986


What is sql server used for?

1100


Name 3 ways to get an accurate count of the number of records in a table?

1086


Does partitioning ssd reduce performance?

930


What is 5nf in normalization form?

1045


Issues related in upgrading SQL Server 2000 to 2005 / 2008

1941


What’s the use of custom fields in report?

988


How to remove duplicate rows from table?

1312