Question

Write a query to fetch department-wise count of employees sorted by department’s count in ascending order. EmployeeInfo is the table name.

A SELECT Department, count(EmpID) AS EmpDeptCount FROM EmployeeInfo GROUP BY Department ORDER BY EmpDeptCount ASC;
B SELECT Department, count(EmpID) AS EmpDeptCount FROM EmployeeInfo Order BY Department Group BY EmpDeptCount ASC;
C SELECT Department, MAX(EmpID) AS EmpDeptMax FROM EmployeeInfo GROUP BY Department ORDER BY EmpDeptCount ASC;
D SELECT Department, MAX(EmpID) AS EmpDeptCount FROM EmployeeInfo GROUP BY Department Group BY EmpDeptCount ASC;
E None
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)