title: how to create a MySql query to display running balance from credit and debit where multiple customers have indivdual balances
body: <p>I have a table as with the structure below:
  <a href="https://i.stack.imgur.com/jcHwf.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>The Table is a simple credit and debit table for different customers <strong>( each customer has his own ID)</strong>.</p>
  <p>Transactions take place on different dates. Each transaction has its own ID which is chronologically generated.</p>
  <p>A view must be created as showing the running balance of each customer. The view gives the list chronologically arranged.</p>
  <p>The list items are</p>
  <ol>
  <li>Transaction:</li>
  </ol>
  <ul>
  <li>ID</li>
  <li>Customer_ID</li>
  <li>Date</li>
  <li>Credit</li>
  <li>Debit and</li>
  <li>Balance (Calculated)</li>
  </ul>
  <p>I would like to get the query code for solving the above problem.
  Thanking you in anticipation.</p>