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

select b.Region, a.TSize, Count(a.TSize)
as TSizecount from Table1 a,Table2 b where a.Empid =
b.Empid and a.TSize=3 group by region, TSize order by
Region, count(*), TSize desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain Reporting Life Cycle?

129


Create and insert into temp table in sql server?

1034


What is perspective, have you ever created perspective? : sql server analysis services, ssas

917


What samples and sample databases are provided by microsoft?

1038


How to check table values in sql server?

957


How do I get to sql server configuration manager?

1010


How to query multiple tables jointly?

991


When is the use of update_statistics command?

1009


Explain about protocol layer present in SQL server?

1207


Do you know what is blocking?

960


How many instances per computer are there in sql server 2000?

1078


How to configure odbc dsn with different port numbers?

1089


what are the disadvantages of cursors? : Sql server database administration

1029


Which tcl commands are available on the sql server?

1084


What is the current limitation of the size of SQL Azure DB?

127