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
What is the use of commit?
Explain what is lock escalation and what is its purpose?
What will happen if a column containing char type data is changed to the nchar data type?
What is default port number for sql server 2000?
How to reaname table name without using sp_Rename in sql server..?
Give a example to search fr a string in all stored procedure in sql server.
How important do you consider cursors or while loops for a transactional database?
Explain error handling in ssis?
What are horizontal and vertical scaling?
can any body tell me how to know the password of current user in sql server
what are the new features introduced in sql server 2000? : Sql server database administration
How do I perform an unattended install of sql server 2000?
How to connect php with different port numbers?
How to invoke a trigger on demand?
How to replace given values with null using nullif()?