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 is the use of commit?

1001


Explain what is lock escalation and what is its purpose?

932


What will happen if a column containing char type data is changed to the nchar data type?

1103


What is default port number for sql server 2000?

1051


How to reaname table name without using sp_Rename in sql server..?

996


Give a example to search fr a string in all stored procedure in sql server.

988


How important do you consider cursors or while loops for a transactional database?

970


Explain error handling in ssis?

1027


What are horizontal and vertical scaling?

172


can any body tell me how to know the password of current user in sql server

2076


what are the new features introduced in sql server 2000? : Sql server database administration

923


How do I perform an unattended install of sql server 2000?

1086


How to connect php with different port numbers?

1087


How to invoke a trigger on demand?

1094


How to replace given values with null using nullif()?

994