I have a simple query in MongoDB as:
{ $group : { _id : { color: "$color", transport: "$transport"} , count : { $sum : 1 } } }
It means query in sql as:
select color, transport,count(1) from t group by color, transport
I would ask what _id means in the above mongodb query, if i change _id to any other string,such as groupBy, the error is: groupBy is not an aggregation operator,looks it has to be _id and can't be changed