list_dept function

List departments with aggregations