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 / sudeep ranjan

select gender,count(gender)as gender_count from emp group
by gender;

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is dialect in sql?

698


Is sql better than access?

709


Can we use join in subquery?

773


What is union and union all keyword in sql and what are their differences?

799


How delete all records from table in sql?

719






What are hotfixes and patches?

687


Can we rollback after truncate?

745


what are the different tables present in mysql? : Sql dba

676


What is trigger point?

730


How do you use a while loop in pl sql?

714


What is difference between sql and mysql?

742


what is a composite key ? : Sql dba

794


What is composite primary key in sql?

706


In a distributed database system, can we execute two queries simultaneously?

750


What is dense_rank?

694