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 are database files and filegroups? : Sql server database administration
What is the syntax to execute the sys.dm_db_missing_index_details?
What is built-in function?
What is a DBMS, query, SQL?
What is sql or structured query language?
Difference Between ORDER BY Clause and GROUP BY Clause in SQL?
Is it possible in sql table to have more than one foreign key?
How to define and use table alias names in ms sql server?
What is a data collection table?
How can I know what locks are running on which resource?
What is the minimum recommended amount of ram for sql server 2012 enterprise?
Do you know what are the properties of the relational tables?
what are the new features introduced in sql server 2000? : Sql server database administration
Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.
What are the advantages dts has over bcp?