connect-db.js
has the necessary connect function using Sequelizemodels/
has the Models that represent the following schema:
index.js
has the following sequelize query examples:- Find all customers
- Find customer by ID = 1
- Find customer where first name is equal to Sarah
- Find or create customer with email equal to "[email protected]"
- Find and count all products where price is between [5, 35]
- Count the number of orders for a customer (customer_id = 1)
- Insert a new order for customer_id = 1
- Find total price of ordered items that belong to order with ID = 1
- Find all customers who have placed an order, along with the total number of orders each customer has placed
- Find the top 5 most expensive products, along with the total number of orders each product has been ordered in
- Find all customers who have placed an order in the last 30 days, along with the total value of orders for each customer
- Find all orders that have at least one product with a price greater than $90, along with the total number of such products in each order
DB=<db_name>
DB_USER=<db_user>
DB_PASS=<db_pw>
DB_HOST=<db_host>
DB_PORT=3306