Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Asnswer 2 0 questions using NoSQL and this database in the picture: Q 1 : Find the total number of orders placed by each customer.
Asnswer questions using NoSQL and this database in the picture: Q: Find the total number of orders placed by each customer. Q: List all customers who have placed more than orders. Q: Find the total sales amount for each sales representative. Q: List all products with a price greater than $ Q: Find the average price of products in each category. Q: Count the number of products that have stock quantity less than Q: Find all orders with a total amount greater than $ Q: List all suppliers located in the USA. Q: Find the maximum price of any product. Q: List all products supplied by 'Office World'. Q: Count the number of distinct categories of products. Q: List all orders along with the products ordered in each. Q: Find the total quantity of 'Keyboard' sold. Q: List all products ordered by each customer. Q: Find the total revenue generated by each product category. Q: Find the total number of orders with status 'Shipped'. Q: Find the products that have been ordered more than times. Q: Find the average quantity ordered for each product. Create Customers collection dbCustomers.insertMany Country: 'USA', SalesRepID: SalesRepID: 'Canada', SalesRepID: 'Canada', SalesRepID: SalesRepID: 'Canada', SalesRepID: 'USA', SalesRepID: Country: 'USA', SalesRepID: 'Canada', SalesRepID: 'USA', SalesRepID: ; dbOrders.insertMany OrderID: CustomerID: OrderDate: new Date Status: 'Pending', ShippingDate: null, TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Cancelled', ShippingDate: null, TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Shipped', ShippingDate: new Date TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Delivered', ShippingDate: new Date TotalAmount: SalesRepID: ; Create Products collection dbProducts.insertMany ProductID: ProductName: 'Keyboard', Category: 'Accessories', StockQuantity: Price: ProductID: ProductName: 'Desk', Category: 'Furniture', StockQuantity: Price: ProductID: ProductName: 'Headphones', Category: 'Electronics', StockQuantity: Price: ProductID: ProductName: 'Printer', Category: 'Office Supplies', StockQuantity: Price: ProductID: ProductName: 'Laptop', Category: 'Electronics', StockQuantity: Price: ; dbOrderDetails.insertMany OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: ; Create Suppliers collection dbSuppliers.insertMany SupplierID: SupplierName: 'Office World', ContactName: 'Jane Smith', ContactEmail: 'jane.smith@officeworld.com', Phone: Country: 'USA' ; Create ProductSuppliers collection dbProductSuppliers.insertMany ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID: ;
Asnswer questions using NoSQL and this database in the picture:
Q: Find the total number of orders placed by each customer.
Q: List all customers who have placed more than orders.
Q: Find the total sales amount for each sales representative.
Q: List all products with a price greater than $
Q: Find the average price of products in each category.
Q: Count the number of products that have stock quantity less than
Q: Find all orders with a total amount greater than $
Q: List all suppliers located in the USA.
Q: Find the maximum price of any product.
Q: List all products supplied by 'Office World'.
Q: Count the number of distinct categories of products.
Q: List all orders along with the products ordered in each.
Q: Find the total quantity of 'Keyboard' sold.
Q: List all products ordered by each customer.
Q: Find the total revenue generated by each product category.
Q: Find the total number of orders with status 'Shipped'.
Q: Find the products that have been ordered more than times.
Q: Find the average quantity ordered for each product. Create Customers collection
dbCustomers.insertMany
Country: 'USA', SalesRepID:
SalesRepID:
'Canada', SalesRepID:
'Canada', SalesRepID:
SalesRepID:
'Canada', SalesRepID:
'USA', SalesRepID:
Country: 'USA', SalesRepID:
'Canada', SalesRepID:
'USA', SalesRepID:
; dbOrders.insertMany OrderID: CustomerID: OrderDate: new Date Status: 'Pending', ShippingDate: null, TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Cancelled', ShippingDate: null, TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Shipped', ShippingDate: new Date TotalAmount: SalesRepID: OrderID: CustomerID: OrderDate: new Date Status: 'Delivered', ShippingDate: new Date TotalAmount: SalesRepID: ; Create Products collection
dbProducts.insertMany ProductID: ProductName: 'Keyboard', Category: 'Accessories', StockQuantity: Price: ProductID: ProductName: 'Desk', Category: 'Furniture', StockQuantity: Price: ProductID: ProductName: 'Headphones', Category: 'Electronics', StockQuantity: Price: ProductID: ProductName: 'Printer', Category: 'Office Supplies', StockQuantity: Price: ProductID: ProductName: 'Laptop', Category: 'Electronics', StockQuantity: Price:
; dbOrderDetails.insertMany OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: OrderDetailID: OrderID: ProductID: Quantity: UnitPrice: ; Create Suppliers collection
dbSuppliers.insertMany SupplierID: SupplierName: 'Office World', ContactName: 'Jane Smith', ContactEmail: 'jane.smith@officeworld.com', Phone: Country: 'USA' ; Create ProductSuppliers collection
dbProductSuppliers.insertMany ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID: ProductID: SupplierID:
;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started