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

How will you know when statistics on a table are obsolete?

1082


How to get the definition of a trigger back?

1002


What is temporal table?

887


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

1010


Tell me the phases a transaction has to undergo?

962


Explain isolation levels that sql server supports?

1039


What are the differences between stored procedure and the dynamic sql?

1091


Explain different types of locks in sql server.

1078


What is row-level compre?

996


What is system stored procedures?

1040


SQL Server Architecture ?

2456


Does sql server 2016 have ssms?

960


What is an indice?

1037


what authentication modes does sql server support? : Sql server database administration

1105


What is attribute hierarchy? : sql server analysis services, ssas

1018