Write Query: Nested Queries and Fields
The task involves retrieving products from a collection based on specific promotional criteria and categories. Eligible categories include "Accessories," "Audio," and "Cables." Products must either be budget essentials (priced below $12 with at least 50 units in stock) or premium picks (priced between $20 and $30 with a rating of 3.5 or higher). The output should include the product's name, category, brand, price, stock, and rating, utilizing a nested query to filter the results accordingly.
We'll cover the following...
We'll cover the following...
Questions
Given the following sample documents from the products collection:
[
{
"_id": "a101a9c0c1f9472db1c01a11",
"name": "Laptop",
"category": "Computers",
"brand": "Zenbyte",
"price": 899,
"stock": 34,
"status": ......