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
Create and insert into temp table in sql server?
Explain full-text query in sql server?
What is create statement?
How to install sql server 2005 express edition?
How to create a scrollable cursor with the scroll option?
What is the difference between a function and a trigger?
How you can change a cross join into an inner join?
Explain some stored procedure creating best practices or guidelines?
Mention what are the different types of ssrs reports?
What are views in ms sql server?
What is data source document?
Do you know what is a with(nolock)?
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
When cursors are useful?
What is unique key constraint?