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
Tell me when is the update_statistics command used?
What is rs.exe utility?
What is for xml in sql server?
how to trace the traffic hitting a sql server? : Sql server database administration
How to execute multiple stored procedures at one time in sql server?
What is the datatype of rowid?
What is coalesce in sql server?
What is @@error in sql?
What is sql azure database?
How to delete all rows with truncate table statement in ms sql server?
Why it is recommended to avoid referencing a floating point column in the where clause?
explain what is raid and what are different types of raid configurations? : Sql server database administration
How do you use a subquery to find records that exist in one table and do not exist in another?
What is difference between inner join and full join?
What is SQL Azure Fabric?