I\'m trying to get a count of all distinct departments. I\'d like the results to contain the deptType, deptName and the count. The grouping works, and results show deptType and
Sorry guys that was silly:
(...) $group: { _id : { dType : "$departments.deptType", dName : "$departments.deptName" }, dCount: { $sum: 1 }, } (...)