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 / shivaindu
SQL> select sum(decode(gender, 'male', 1)) as Male,
sum(decode(gender, 'female', 1)) as Female from
emp1;
MALE FEMALE
---------- ----------
9 7
| Is This Answer Correct ? | 16 Yes | 1 No |
Post New Answer View All Answers
How do I run a pl sql program?
Explain table and field in sql?
What is right join in sql?
Explain the steps needed to create the scheduled job?
Is it possible to sort a column using a column alias?
What are the two characteristics of a primary key?
What is varchar used for?
Why do we create views in sql?
Is sql the best database?
What is the use of stored procedures?
What is coalesce sql?
How to fetch alternate records from a table?
difference between anonymous blocks and sub-programs.
What is primary key and foreign key?
what is the difference between delete and truncate commands? : Sql dba