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 extended events?
How many types of stored procedures are there in sql server?
What are the steps to follow to configure SQL*Net?
Where do we use trace frag?
What is difference between global temporary tables and local temporary tables?
Which are the third-party tools used in sql server and why would you use them?
What are the reporting services components?
What are the steps you can take to avoid “deadlocks”?
Why can there be only one clustered index and not more than one?
How to find the login name linked to a given user name?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
What are views used for?
How to create a view using data from another view?
Will the writetext statement activate a trigger?
Which is the best place or learning center for MS SQL?????In Bangladesh?????