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
Mention what are the different types of ssrs reports?
Write a sql query to sort on different column name according to the parameters passed in the function?
explain the difference between oracle- sql and sql server sql ? if both are same y we r using 2 sw.s?
What are the basic functions for master, msdb, model, tempdb and resource databases?
What happens when the SQL Azure database reaches Max Size?
How to loop through returning rows?
What are the difference between clustered and a non-clustered index?
What are the restraints imposed on the table design by a merge replication?
What is the order by used for?
What is star, snowflake and star flake schema? : sql server analysis services, ssas
How do I create a stored procedure in dbml?
What is side by side migration in sql server?
What is system stored procedures?
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
How do I setup a sql server database?