title: Query to retrieve sum for each distinct Customer with varied Date ranges
body: <p>I have a database(CustomerTranscactions) which has a list of customer transactions whenever they buy something. I would want to know "Total value" (sum) of what they have bought for a specified date range, but the problem here is the date range is different for each customer. </p>
  
  <p>I would like to provide this custom data range in the "where" clause something like (001, '2015-06-28','2016-03-31') for each customer id OR dump it in a separate temp table. (Will have anywhere about 70-100 customerIds when i run it eeach time)</p>
  
  <p>CustomerTransactions table has the below columns
  1. CustomerId,
  2. TransDate,
  3. ItemId,
  4. Quantity,
  5. Discount,
  6. Value,</p>
  
  <p>Kindly help</p>
  
  <p>Thanks,
  Ramesh</p>