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 / pradip jain
select top 1 region,count(t2.eid) a
from t2
join t1 on t1.eid=t2.eid
group by region,[T-Shirt_Size]
having [T-Shirt_Size]=3
order by a desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of self join?
What are indexes in ms sql server?
How many tables can be joined in SQL Server?
What is sql view?
How to delete duplicate rows?
What is rs.exe utility?
What is default constraint?
how to invoke a trigger on demand? : Sql server database administration
How to connect a database with sql express.?
How can we improve performance by using SQL Server profiler?
Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security
What is the difference between count and distinct count?
What are cascading parameters in ssrs reports?
What is sub-query in sql server? Explain its properties.
Explain stored procedure?