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 / avaneesh bajoria
select top 1 t2.region , count(t1.tsize) as co from tsize
t1,region t2
where t1.empid = t2.empid
group by t2.region,t1.tsize
having t1.tsize = 3 order by co desc
| Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
What is tablix?
What are the drawbacks of reporting in ssrs?
What is key set driven?
What happens if you insert a duplicate key for the primary key column in ms sql server?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
How to perform backup for certificates in sql server? : sql server security
What is purpose of normalization?
What stored procedure would you use to view lock information?
What is plan freezing?
What are subquery and its properties?
What is explicit cursors?
Explain different types of self contained sub query?
Can you please differentiate between a primary key and a unique key?
What is an example of a foreign key?
What are rows and columns?