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 do you mean by a Composite primary key?

0 Answers   Genpact,


Explain the phases a transaction has to undergo?

0 Answers  


Give an example of SQL injection attack ?

0 Answers   HAL,


Why use view instead of a table?

0 Answers  


Which sql server table is used to hold the stored procedure scripts?

0 Answers  


Can a table have 2 foreign keys?

0 Answers  


What does <> symbol mean?

0 Answers  


What is the difference between executequery () and executeupdate ()?

0 Answers  


Why use identity in sql server?

0 Answers  


There are two tables (T1, T2) with different rows. Find the output of query. Select count(*) from T1,T2.

3 Answers   Amdocs,


What is a view?

6 Answers  


What is the guest user account in sql server? What login is it mapped to it? : sql server security

0 Answers  


Categories