Project 2
1. Design your ecommerce database in MongoDB with the specifications provided Below :
- Every Customer would register on the ecommerce website with all their personal information
- Each Customer has a type of being normal or premium member
- The customer should be able to view products and add them to cart
- Products can belong to multiple categories, brands and segments.
- Each category can have subcategories as well.
- Each products can also have multiple tags associated with it.\
- From the cart, the customer should be able to check out and make payment and his/her order would be booked which the customer can track
- The admin of the ecommerce and the seller both can add products under multiple categories, segments and tags
- The seller would receive the orders and should be able to fulfil them.
- The order shipping details and the billing information are very important things to be stored in the database as well.
- Every Seller would register on the ecommerce website with all their personal information.
- Create your collections for your ecommerce database in MongoDB and fill it with sample information
- Submit all the queries used to create the database
Simple Queries to perform on ecommerce db
- Write a query to find the average order value for all Customers.
- Query your database to get top 10 customers whose orders have the highest value and who have been customers since less than 2 months
- Query your database to find the sum of all orders received in this month
- Query your database to find customers count in various cities, group them by names of cities
- Query your database to get all the sellers who have base in the same city in which the customers who ordered their products. Order them in the order of highest number of products sold to customers in same city to lowest.