Giter Club home page Giter Club logo

saas-sequelize-demo's Introduction

SaaS-Sequelize-Demo

  1. connect-db.js has the necessary connect function using Sequelize
  2. models/ has the Models that represent the following schema:

image

  1. index.js has the following sequelize query examples:
    1. Find all customers
    2. Find customer by ID = 1
    3. Find customer where first name is equal to Sarah
    4. Find or create customer with email equal to "[email protected]"
    5. Find and count all products where price is between [5, 35]
    6. Count the number of orders for a customer (customer_id = 1)
    7. Insert a new order for customer_id = 1
    8. Find total price of ordered items that belong to order with ID = 1
    9. Find all customers who have placed an order, along with the total number of orders each customer has placed
    10. Find the top 5 most expensive products, along with the total number of orders each product has been ordered in
    11. Find all customers who have placed an order in the last 30 days, along with the total value of orders for each customer
    12. 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

.Env File Template

DB=<db_name>
DB_USER=<db_user>
DB_PASS=<db_pw>
DB_HOST=<db_host>
DB_PORT=3306

saas-sequelize-demo's People

Contributors

christoshadjichristofi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.