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 / anil gupta
select region, count(t1.size) from tab1 t1 inner join tab2
t2 on t1.eid = t2.eid where t1.size = 3 group by t2.region
order by count(t1.size) DESC and rownum = 1;
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the new data types are introduced in sql 2000?
How do you improve the performance of a SQL Azure Database?
What are filegroups in sql server?
what are questions asked in TCS for database tester (sqlserver)for 2-3 exp?
application server is slow what may be the problem
What is the size of transaction log file?
How can sql injection be stopped? : sql server security
How do I install sql server?
You want to implement the one-to-one relationship while designing tables. How would you do it?
What are the general features of sql server management studio? : sql server management studio
What is a full text index?
What is a mutating table error and how can you get around it?
What is exporting utility?
What kind of problems occurs if we do not implement proper locking strategy?
What is indexing explain it with an example?