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 are database files and filegroups? : Sql server database administration

883


What is the syntax to execute the sys.dm_db_missing_index_details?

966


What is built-in function?

927


What is a DBMS, query, SQL?

993


What is sql or structured query language?

1085


Difference Between ORDER BY Clause and GROUP BY Clause in SQL?

1004


Is it possible in sql table to have more than one foreign key?

976


How to define and use table alias names in ms sql server?

1041


What is a data collection table?

942


How can I know what locks are running on which resource?

894


What is the minimum recommended amount of ram for sql server 2012 enterprise?

886


Do you know what are the properties of the relational tables?

981


what are the new features introduced in sql server 2000? : Sql server database administration

870


Retrieve the unique rows from table without using UNIQUE and DISTINCT keywords.

954


What are the advantages dts has over bcp?

940