title: Different results from the same sql query depending on platform
body: <p>The following query below gives me two different results depending on which platform I use to execute the query. In Phpmyadmin I get one result and Flyspeed another result. See screenshot:
  <a href="https://i.stack.imgur.com/te32i.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/te32i.png" alt="enter image description here" /></a> . Why would there be a difference ? Is there a setting which would cause the difference ?</p>
  <pre><code>Select
      untdchem_db2.customer_credits.CustID,
      untdchem_db2.customers.CustCompanyName,
      (To_Days(CurDate()) - To_Days(untdchem_db2.customer_credits.CustCreditDate)) As days_past_due,
      Sum(If(((Select
           days_past_due) Between 1 And 30), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As zero_30,
      Sum(If(((Select
           days_past_due) Between 31 And 40), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As thirty_40,
      Sum(If(((Select
           days_past_due) Between 41 And 50), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As forty_50,
      Sum(If(((Select
           days_past_due) Between 51 And 60), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As fifty_60,
      Sum(If(((Select
           days_past_due) Between 61 And 90), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As sixty_90,
      Sum(If(((Select
           days_past_due) &gt; 90), untdchem_db2.customer_credits.CustCreditTotalAmount, 0)) As ninety_plus
  From
      customer_credits Inner Join
      customers On customer_credits.CustID = customers.CustID
  Where
      customer_credits.CustCreditTakenDate Is Null
  Group By
      customer_credits.CustID;
  </code></pre>