title: Mysql Query for Aging Report
body: <p>I want to create a current,30, 60, 90, day aging reports in Matrix Format using mysql query</p>
  
  <p>For example,</p>
  
  <p>ClientName     Current        1-30         31-60        >90      <b>Total</b></p>
  
  <p>AAA                                                      3000       1500                                                    <b>4500</b>  </p>
  BBB                                                      2000       200               <b>2200 </b>
  <br><br><b>TOTAL</b>
  <b>                           3000 3500      200   6700</b></p>
  
  <p><p>
  i want to get the report like this. when user enters the date, it should check with duedate. when entered date is > due_date, get the aging days. </p>
  
  <p>if aging agin days is today then get netAnmount and display in current column, <p>
  if difference is 1-30 days then next column...etc...</p>
  
  <p>how to get query for this?</p>
  
  <ul>
  <li>Gnaniyar Zubair</li>
  </ul>