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
Himesh is also correct with little change..
select top 1 region,count(*) e
from t2 JOIN t1 ON (t1.eid = t2.eid and
t1.[T-Shirt_Size] = 3)
group by region
order by e desc
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
When would you use a before or after trigger?
What happens if we shrink log file in sql server?
What is impersonation? What are the different impersonation options available in ssas? : sql server analysis services, ssas
What is the use of “join” in sql server?
What is page-level compression?
Does sql server 2000 clustering support load balancing?
What is nonclustered index with included columns ?
What is stretch database in sql server?
Describe in brief sql server monitoring ways.
Do you know what is replace and stuff function in sql server?
What is the syntax for encrypting a column in SQL Server?
Define Joins?
Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
Explain a join?
Explain what is log shipping?