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


Please Help Members By Posting Answers For Below Questions

Mention what are the different types of ssrs reports?

126


Write a sql query to sort on different column name according to the parameters passed in the function?

698


explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?

2195


What are the basic functions for master, msdb, model, tempdb and resource databases?

752


What happens when the SQL Azure database reaches Max Size?

104


How to loop through returning rows?

737


What are the difference between clustered and a non-clustered index?

761


What are the restraints imposed on the table design by a merge replication?

791


What is the order by used for?

794


What is star, snowflake and star flake schema? : sql server analysis services, ssas

857


How do I create a stored procedure in dbml?

693


What is side by side migration in sql server?

751


What is system stored procedures?

760


What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?

131


How do I setup a sql server database?

768