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

What are ddl (data definition language) statements for tables in ms sql server?

1104


What is a linked server in sql server?

1080


Is it possible to replicate data from sql server to oracle? : sql server replication

1098


Describe the left outer join & right outer join. : sql server database administration

999


What are three major types of constraints?

1122


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

1041


What is surrogate key? : sql server analysis services, ssas

1111


How to replace the Query Result 'Null Value' with a text ?

1047


Can we shrink data file in sql server?

1054


What are the differences between char and nchar in ms sql server?

1091


What is the Difference Between Primary and Foreign Key?

1013


What are the five major components of a dbms?

931


How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

2002


What is the optimization being performed in oracle and SQL Server?

1053


What is the largest component inside a field?

1132