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 / karthick veerappan
select top 1 region,count(*) from table2 where empid in
(select empid from table1 where tsize=3) group by region
order by count(*) desc
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
how to determine the service pack currently installed on sql server? : Sql server database administration
How to drop an existing schema in ms sql server?
Working with TLogs
What is sql sandbox in sql server?
what is dbcc? : Sql server database administration
Explain difference between cross join and full outer join?
What does COMMIT command do?
what is difference between NULL and ISNULL in SQL Server 2008?
What are points to remember while using the fillfactor argument?
How to create an index on an existing table in ms sql server?
Where are sql server user names and passwords stored in sql server?
How to run sql server 2005 books online on your local system?
What are the database objects? : SQL Server Architecture
‘Order by’ is not allowed in a view how can you sort information from a view?
What are SSL and TSL protocols?