I have a taxonomy field as department .I need to use group by query in this field.is possible to do it? If yes, suggest some idea to implement it..
SharePoint supports grouping by Lookup and Taxonomy fields but not multivalued ones.
They suggest your field was still created as a TaxonomyMulti type, which would put you in the position where you cannot select it in the 'Group By' dropdown.
As you may see in the links, you may need to reconfigure your field to actually set the property
The posts also suggest to use different views (each filtered to a single MMD value) to emulated a group by, simply by changing views.
When I was confronted to a similar situation, I created a text field and a 2010 WorkFlow to actually export the value to the textfield, allowing me to use this one to group by (or any other process that requires a 'normal' field).
Hope this helps !