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 the difference between clustered and non-clustered indexes?

603


What is the difference between sql and mysql?

558


How do I partition in sql?

539


how to convert character strings to dates? : Sql dba

525


what is union, minus and interact commands? : Sql dba

661






What are the types pl/sql code blocks?

609


what is online transaction processing (oltp)? : Sql dba

529


What is sql trigger example?

541


Write a query to display the current date in sql?

516


tell me about various levels of constraint. : Sql dba

531


Can we connect to postgresql using sql developer?

489


Can you join a table to itself?

544


What are sql functions? Describe in brief different types of sql functions?

489


How do sql databases work?

533


Explain clause in sql?

564