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
What is perspective, have you ever created perspective? : sql server analysis services, ssas
Explain what are the restrictions while creating batches in sql server?
What are the benefits of normalization?
Mention the differences between substr and charindex in sql server.
Explain how you can configure a running aggregate in SSRS?
Can we take the full database backup in log shipping?
where can you add custom error messages to sql server? : Sql server administration
Which language rdl files made of?
How to get nth highest salary from employee table.
How to generate random numbers with the rand() function in ms sql server?
What are the instances when triggers are appropriate?
What is primary key, unique key, and foreign key?
Can we install sql server 2016 on windows 7?
How to find the list of fixed hard drive and free space on server?
How do I determine how many instances of sql server are installed on a computer?