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

Answers were Sorted based on User's Feedback



can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize..

Answer / himesh mistry

select region
from table2 t2 JOIN table1 t1 ON (t1.eid = t2.eid and
t1.size = 3)
group by region

Is This Answer Correct ?    3 Yes 4 No

can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize..

Answer / padmavasireddy

Thnak you karthick and ram

Is This Answer Correct ?    0 Yes 2 No

can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize..

Answer / sandeep narayanan

SELECT B.Region FROM TABLE1 AS A
INNER JOIN TABLE2 AS B ON A.EmployeeID=B.EmployeeID
WHERE A.TShirtSize=3

Is This Answer Correct ?    0 Yes 3 No

can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize..

Answer / manisha

select b.region from table1 as a,table2 as b
where a.employeeid=b.employeeid and a.[tshirt size]=3

Is This Answer Correct ?    0 Yes 7 No

can any one answer this query,thank you in advance Table 1 has 2 columns: EmployeeId, T shirtsize..

Answer / ram

select region from tab2 where empid in(select empid from
tab1 where tshirtsize=3)

Is This Answer Correct ?    1 Yes 10 No

Post New Answer

More SQL Server Interview Questions

What is a partition key?

0 Answers  


What is the best way to move n number of DTS package from one SQLServer to another SQLServer?

1 Answers   RBS,


employee table has employee id ----------- empid ---------------- 1 2 3 3 3 4 5 5 5 6 6 6 7 here the values r repeated two times.how to select the repeated values only.i.e 3,5,6 should alone come.

3 Answers  


What are four major operators that can be used to combine conditions on a where clause?

0 Answers  


How can a user-defined datatype be created?

0 Answers  


what is hash nonclustered index

0 Answers  


What are different types of join?

0 Answers  


Create Index myIndex On myTable(myColumn) What type of Index will get created after executing the above statement

3 Answers  


How do you know which index a table is using?

4 Answers  


Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many

0 Answers  


What are sp_configure commands and set commands?

0 Answers  


What are the type of joins? When do we use Outer and Self joins?

3 Answers  


Categories