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 is a sub-report?
How do indexes help, types?
Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication
what is the information that can be stored inside a bit column? : Sql server database administration
Why variables called the most powerful component of ssis?
What are logical database components? : SQL Server Architecture
How to find the list of fixed hard drive and free space on server?
Tell me about normalization in DBMS.
What are out-of-range errors with date and time literals?
How to change the password of a login name in ms sql server?
How to join two tables in a single query in ms sql server?
Explain following error properties?
What is a dataset and what are the different types of datasets?
Can I delete event logs?
What is built-in function?