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 / ashok

select b.Region, a.TSize, Count(a.TSize)
as TSizecount from Table1 a,Table2 b where a.Empid =
b.Empid and a.TSize=3 group by region, TSize order by
Region, count(*), TSize desc

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does Master database contains?

711


Name few endpoints exposed by ssrs 2012?

321


It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

649


What is the difference between indexing and hashing?

625


What are different types of join?

860






Explain the microsoft sql server delete command?

620


What is subquery? Explain the properties of a subquery?

596


What do you mean by cardinality?

575


What are sub reports?

160


What are the differences between stored procedure and view in sql server?

716


What is CTE in SQL

626


What are click through reports?

108


Explain what is lock escalation?

670


How do I create a stored procedure in dbml?

605


Explain about integration services of Microsoft SQL server?

679