Snippets Collections
[
  {
    "$match": {
      "$and": [
        {
          "$expr": {
            "$gte": [
              "$Invoice_date",
              {
                "$dateFromString": {
                  "dateString": "2022-07-17T00:00Z"
                }
              }
            ]
          }
        },
        {
          "$expr": {
            "$lt": [
              "$Invoice_date",
              {
                "$dateFromString": {
                  "dateString": "2022-07-18T00:00Z"
                }
              }
            ]
          }
        }
      ]
    }
  },
  {
    "$group": {
      "_id": null,
      "count": {
        "$sum": 1
      }
    }
  },
  {
    "$sort": {
      "_id": 1
    }
  },
  {
    "$project": {
      "_id": false,
      "count": true
    }
  }
]
[
  {
    "$match": {
      "$and": [
        { "min_qty_rx": { "$gt": 1 } },
        { "salts.salts": { "$in": ["ALPRAZOLAM", "BALOFLOXACIN"] } }
      ]
    }
  },
  {
    "$project": {
      "sku": "$sku",
      "name": "$name",
      "prescription_required": "$prescription_required",
      "min_qty_rx": "$min_qty_rx",
      "salts": "$salts"
    }
  }
]

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension