I have table named Students in PostgreSQL. In that table i have StudId, StudName and Gender columns. I want to get the number of male and female students in the table in a single result set in a function.
StudId StudName Gender
101 Peter M
102 George M
103 Mary F
104 Rose F
I already done this with SQL Server and MySQL. But I don't have any idea to do this with PostgreSQL.
I'm newer one to PostgreSQL, someone helps to finds the results. Thanks in advise.