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 / susanna
select top 1 Count(r.Empid) as Ct,r.regionId from Emp_Region
r inner join Emp_Tshirt t on r.Empid= t.EmpId
where t.T_size=3 group by r.regionId order by Ct desc
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are a scheduled jobs or what is a scheduled tasks?
How to list all schemas in a database?
What types of Joins are possible with Sql Server?
What are dml triggers and types of dml triggers?
What command is used to create a database in the sql server and how?
Name the different type of indexes in sql?
Why olap is used?
What is a matrix in ssrs?
how can you attach more than 20 ldf files in sql server
Explain transaction server distributed transaction?
When is update_statistics command used?
What is master database? : SQL Server Architecture
What is tempdb database? : SQL Server Architecture
Explain different types of lock modes in sql server 2000?
Explain about nested stored procedure?