All SKUs which contains at least one of the salts and has min_qty_rx > 1

PHOTO EMBED

Sun Jul 17 2022 17:48:54 GMT+0000 (UTC)

Saved by @surbhkrmkr #mongo #metabase

[
  {
    "$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"
    }
  }
]
content_copyCOPY