search

Home  >  Q&A  >  body text

mongodb - mongo 的group用法

mongo的group怎么能想MySQL一样select * from XX group by xx 输出所有的值

为情所困为情所困2761 days ago685

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-28 09:07:24

    Use aggreat*, and then write in the $group
    _id field what you want to group

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-28 09:07:24

    Use MongoDB’s aggregation operation (aggregate), please see the official documentation for details, click here

    reply
    0
  • Cancelreply