Skip to content

MongoDB Query Cheatsheet

SOV edited this page May 10, 2023 · 1 revision

Useful MongoDB Compass Query commands

  1. Find all business or upgrade that has the userId
{ userId: ObjectId('64524cd98f15df8d46dcab3f') }
  1. Find all user with updatedAt 10/May or later
{ updatedAt: { $gt: Date('2023-05-10') } }
  1. Find one user with _id
{ _id: ObjectId('64524cd98f15df8d46dcab3f') }
Clone this wiki locally