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 database roles? : sql server security
What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas
How do you manipulate data?
What will be query used to get the list of triggers in a database?
Explain different types of self contained sub query?
What is the data type of time?
What are trace flags?
How do I get Report Builder to generate a parameter that can be set by users viewing the report?
List all the types of user-defined functions?
what's the maximum size of a row? : Sql server database administration
Can you explain the disadvantages/limitation of the cursor?
Is it possible to update the views? If yes, how, if not, why?
How ssrs maintain security?
What is user-defined function?
What are different replication agents and what's their purpose? : sql server replication