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 are the grouping functions?
Does view occupy space?
What is set nocount on and what is set nocount off?
Which is the main third-party tool used in sql server?
What is molap and its advantage? : sql server analysis services, ssas
Will the writetext statement activate a trigger?
What do you mean by authentication modes in sql server?
Explain optimistic and pessimistic concurrency?
What type of locking occurs during the snapshot generation? : sql server replication
How will you find out if there are expensive SQL statements running or not?
What is a non clustered primary key?
how to create a scrollable cursor with the scroll option? : Sql server database administration
What is a view in sql?
Introduction of rollup clause using sum and group by clause?
How to define and use table alias names in ms sql server?