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 / anil gupta

select region, count(t1.size) from tab1 t1 inner join tab2
t2 on t1.eid = t2.eid where t1.size = 3 group by t2.region
order by count(t1.size) DESC and rownum = 1;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the database roles? : sql server security

1110


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

1019


How do you manipulate data?

874


What will be query used to get the list of triggers in a database?

970


Explain different types of self contained sub query?

973


What is the data type of time?

930


What are trace flags?

984


How do I get Report Builder to generate a parameter that can be set by users viewing the report?

143


List all the types of user-defined functions?

1030


what's the maximum size of a row? : Sql server database administration

1040


Can you explain the disadvantages/limitation of the cursor?

941


Is it possible to update the views? If yes, how, if not, why?

985


How ssrs maintain security?

1033


What is user-defined function?

930


What are different replication agents and what's their purpose? : sql server replication

976