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
Are semicolons required at the end of sql statements in sql server 2005?
What is acid properties?
What is table-valued sub query?
which backup strategy you are following at ur company
What is the difference between ‘having’ clause and a ‘where’ clause?
How do I find the port number for sql server?
Can we perform backup restore operation on tempdb? : sql server database administration
Explain the first normal form(1nf)?
How to rebuild the master database?
If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security
What is normalization and denormalization in sql server?
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
How do I find the transaction log size in sql server?
Which joins are sql server default?
How to verify the port number of the sql server?