title: In Mongoose using find Query and sorting the data with multiple conditions and changes in sort data
body: <pre><code>//Code for one condition of sort
  
  var query = SbAggregate.find({
      MemberClassType: memberType,
      CreatedDate: { "$gte": new Date(start), "$lte": new Date(end) }
  }).sort({ field1: -1, field2: -1 });
  
  query.exec(function (err, doc) {
      //data
  }
  
  //In same method doing another query
  var query = SbAggregate.find({
      MemberClassType: memberType,
      CreatedDate: { "$gte": new Date(start), "$lte": new Date(end) }
  }).sort({ field2: -1 });
  
  query.exec(function (err, doc) {
      //data
  }
  
  //Same method another condition for sort
  var query = SbAggregate.find({
      MemberClassType: memberType,
      CreatedDate: { "$gte": new Date(start), "$lte": new Date(end) }
  }).sort({ field3: -1 });
  
  query.exec(function (err, doc) {
      //data
  }
  </code></pre>
  
  <p>Make condition dynamically set by variable and call on same method                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         with multiple queries in multiple sortin conditions.</p>