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 / avaneesh bajoria

select top 1 t2.region , count(t1.tsize) as co from tsize
t1,region t2
where t1.empid = t2.empid
group by t2.region,t1.tsize
having t1.tsize = 3 order by co desc

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is tablix?

160


What are the drawbacks of reporting in ssrs?

147


What is key set driven?

906


What happens if you insert a duplicate key for the primary key column in ms sql server?

949


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

921


How to perform backup for certificates in sql server? : sql server security

1047


What is purpose of normalization?

912


What stored procedure would you use to view lock information?

927


What is plan freezing?

922


What are subquery and its properties?

998


What is explicit cursors?

1015


Explain different types of self contained sub query?

973


Can you please differentiate between a primary key and a unique key?

974


What is an example of a foreign key?

944


What are rows and columns?

973