May I ask mongodb how to query duplicate data?

Boss database has a user table with an IP field in it. How can I find out all the data with duplicate IP in this table?

Mar.12,2021

can be implemented using aggregate .
for example:

  

has been solved. Thank you ~

Menu