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 / avaneesh bajoria
select top 1 t2.region , count(t1.tsize) as co from tsize
t1,region t2
where t1.empid = t2.empid
group by t2.region,t1.tsize
having t1.tsize = 3 order by co desc
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
How to insert stored procedure result into temporary table?
what is a mixed extent? : Sql server administration
How many types of triggers are there?
What are exact numeric data types in ms sql server?
What is sleeping status in sql server?
Explain about the command-line tool SQLCMD?
What are key constraints?
Can group functions be mixed with non-group selection fields in ms sql server?
Can You Use A Stored Procedure To Provide Data To An Ssrs Report?
How to return the date part only from a sql server datetime datatype?
How to recover from sql injection? : sql server security
What is the difference between varchar and varchar types?
What are the steps you can take to avoid “deadlocks”?
what is memory-optimized nonclustered indexes
what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration