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 / pradip jain
select top 1 region,count(t2.eid) a
from t2
join t1 on t1.eid=t2.eid
group by region,[T-Shirt_Size]
having [T-Shirt_Size]=3
order by a desc
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are dml triggers and types of dml triggers?
How can you check the level of fragmentation on a table?
What are the different types of data sources in ssrs?
Explain throw statement in sql server 2008?
what are defaults? : Sql server database administration
Can you insert NULL in unique column?
How use inner join in sql server?
Explain a join?
What is the difference between functions and stored procedures?
How to test odbc dsn connection settings?
how to invoke a trigger on demand? : Sql server database administration
What are ddl (data definition language) statements for tables in ms sql server?
What are various aggregate functions that are available?
What are the advantages of user defined function?
What is the downside of using udf?