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 new data types are introduced in sql 2000?

949


How do you improve the performance of a SQL Azure Database?

137


What are filegroups in sql server?

1099


what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?

5976


application server is slow what may be the problem

2270


What is the size of transaction log file?

987


How can sql injection be stopped? : sql server security

1104


How do I install sql server?

937


You want to implement the one-to-one relationship while designing tables. How would you do it?

1013


What are the general features of sql server management studio? : sql server management studio

1135


What is a full text index?

967


What is a mutating table error and how can you get around it?

1127


What is exporting utility?

1086


What kind of problems occurs if we do not implement proper locking strategy?

1465


What is indexing explain it with an example?

1070