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 is #temp and @table variable in SQL server?
Differentiate between sql temp table vs table variable?
What command must you use to include the not null constraint after a table has already been created?
Can sql servers link to other servers like oracle?
What are blobs, tables, and Queues? Is SQL is the standard way to query blobs, tables, and queues?
what is the information that can be stored inside a bit column? : Sql server database administration
Explain why variables called the most powerful component of ssis?
How to transfer a table from one schema to another?
What are the types of stored procedures in an sql server?
you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration
Does partitioning improve performance?
can we have a nested transaction? : Sql server database administration
Where actually sql azure database is hosted?
What is a select query statement in ms sql server?
What are the different types of backups avaialabe in sql server 2005?