Search⌘ K
AI Features

Write Query: Using Comparison Operators

To identify products with low stock levels in the products collection, a query can be constructed to filter documents where the stock count is 30 or fewer. The output should include only the _id and name fields of these products, allowing the operations team to flag items that need restocking before they run out of inventory.

We'll cover the following...

Question

Given the following sample documents from the products collection:

[
  {
    "_id": "a101a9c0c1f9472db1c01a11",
    "name": "Laptop",
   
...
...