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 / ashok
select b.Region, a.TSize, Count(a.TSize)
as TSizecount from Table1 a,Table2 b where a.Empid =
b.Empid and a.TSize=3 group by region, TSize order by
Region, count(*), TSize desc
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the ways available in sql server to execute sql statements?
What is bcp? When does it use?
What is relationship? What number of sorts of relationship are there?
How to check table values in sql server?
What is store procedure? How do they work? When do you use?
What is coalesce in sql server?
Does view occupy space?
Can you tell me some of the common replication dmv's and their use? : sql server replication
Explain what are the restrictions while creating batches in sql server?
Tell me about normalization in DBMS.
If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?
Define candidate key, alternate key, and composite key.
What is a scheduled job or what is a scheduled task?
Do you know sql server 2008 introduces automatic auditing?
How do you set a trace flag in sql server?