Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Cross-Tab: Gender by Department

For each department return the number of male and female employees as columns male and female. Order by department.

Table schema

Employees(id INT PRIMARY KEY, department VARCHAR(20), gender CHAR(1))

Sample data

id | department | gender
1 | Eng | M
2 | Eng | F
3 | Eng | M
4 | HR | F

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.