Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is perspective, have you ever created perspective? : sql server analysis services, ssas

902


Explain what are the restrictions while creating batches in sql server?

1048


What are the benefits of normalization?

1091


Mention the differences between substr and charindex in sql server.

1027


Explain how you can configure a running aggregate in SSRS?

163


Can we take the full database backup in log shipping?

933


where can you add custom error messages to sql server? : Sql server administration

1087


Which language rdl files made of?

128


How to get nth highest salary from employee table.

1154


How to generate random numbers with the rand() function in ms sql server?

1126


What are the instances when triggers are appropriate?

971


What is primary key, unique key, and foreign key?

959


Can we install sql server 2016 on windows 7?

1116


How to find the list of fixed hard drive and free space on server?

1164


How do I determine how many instances of sql server are installed on a computer?

984