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
List the advantages of using stored procedures?
What does it mean to manipulate data?
What is use of @@ spid in sql server?
What is the difference between migration and upgradation in sql server?
Can you name some of the dml commands in sql?
How can you transfer data from a text file to a database table? Or how can you export data from a table to a comma delimited (csv) file? Or how can you import data from ms access to a table in a database? Or how can you export data from a table to an excel file?
What is sql injection and why is it a problem? : sql server security
What is a covering index?
What types of Joins are possible with Sql Server?
Can group by and orderby be used together?
What is a self join in sql server?
What is a unique index?
Explain steps of normalization?
What is normalization of database?
What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?