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
Which Model uses the SET concept
Can you index views?
what are the different types of SSRS reports?
what is raid? : Sql server database administration
How do I view a script in sql server?
What is the difference between locking and multi-versioning?
What are the different types of Indexes available in SQL Server?
How exceptions can be handled in sql server programming?
What is an index in sql?
Why do we backup Active Directory ?
When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?
Write a SQL command to insert and update only a particular field?
What can be used instead of trigger?
How to provide values to user defined function parameters?
How to replace given values with null using nullif()?