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...

how to achieve this problem?i am having table with two
colums like empno,gender.
in gender column, i am having records male,female like that
.my final output will be
male female
5 6

Answer Posted / jayakrishnan

select count(case gender when 'male' then 1 end) Male,
count(case gender when 'female' then 1 end) Female from emp1

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why are indexes and views important to an organization?

901


When is the update_statistics command used?

1049


how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

1301


How do I enable sql encryption?

969


What is the usage of when clause in trigger?

992


What is primary key secondary key alternate key candidate key?

982


What is relationship? How many types of relationship are there?

1075


what is normalization? : Sql dba

1018


How do I remove all records from a table?

1027


what is sql? : Sql dba

973


What is bitemporal narrowing?

1235


What are the steps for performance tuning.

1273


Do foreign keys improve performance?

968


How does one use sql*loader to load images, sound clips and documents? : aql loader

1122


what are the advantages and disadvantages of views in a database? : Sql dba

999