title: sequelize multiple raw query cannot resolve previous promise
body: <p>I was learning node and try to build a node app using express and sequelize to manage DB data.</p>
  
  <p>I have already build a module for node to connect to DB. Below is the code for the module:</p>
  
  <p>sql.js:</p>
  
  <pre><code>var seq = require('./DBconfig.js');
  
  module.exports = {
  getTable1: function(o){
      return seq.query('SELECT * FROM Table1).then(function(results){
          o.table1 = results;
          return o;
      },
  getTable2: function(o){
      return seq.query('SELECT * FROM Table2).then(function(results){
          o.table2 = results;
          return o;
      },
  getTable3: function(o){
      return seq.query('SELECT * FROM Table3).then(function(results){
          o.table3 = results;
          return o;
      }
  };
  </code></pre>
  
  <p>In my app I am able to use this module one by one perfectly.
  However when I try to join them together:</p>
  
  <p>route.js:</p>
  
  <pre><code>var sql = require('./sql.js');
  
  app.get('/test', function(req,res){
      var a = {data:[{x: 1, y:1}]};
      sql.getTable1(a).then(sql.getTable2(result1)).then(
          sql.getTable3(result2)).then(function(result3){
               console.log(result3);
               res.send(result3);
      })
  }
  </code></pre>
  
  <p>It always return: ReferenceError: result1 is not defined.
  How can I get the promise work to get the resolve passed correctly?</p>