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 / susanna
select top 1 Count(r.Empid) as Ct,r.regionId from Emp_Region
r inner join Emp_Tshirt t on r.Empid= t.EmpId
where t.T_size=3 group by r.regionId order by Ct desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Define model database?
how many clustered indexes can be created on a table? : Sql server database administration
How do I find the sql server version?
What do you understand by check constraint in sql server?
The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio
What is database dimension? : sql server analysis services, ssas
How many levels of sp nesting is possible?
How do I find the sql server database version?
How to delete duplicate records based on single column from a table?
What is the new security features added in sql server 2016? : sql server security
What is Service Broker in sql server 2012?
What is a filestream?
Which rendering formats are affected by the pagesize properties?
Is candidate a key?
What is the purpose of sql profiler in sql server?