title: need to convert sql server query to mysql query
body: <p>I've need to convert following sql server query into mysql</p>
  
  <pre><code>SELECT DATEADD(dd, 0, DATEDIFF(dd, 0, p_date)) [date],
         SUM(p_amount) [sum]
  FROM tbl_Payments
  WHERE DATEADD(dd, 0, DATEDIFF(dd, 0, p_date)) BETWEEN '20130701' AND '20130731'
  GROUP BY DATEADD(dd, 0, DATEDIFF(dd, 0, p_date))
  </code></pre>
  
  <p>column names: p_date,p_amount</p>