Rework edd_get_earnings_by_date() to use SUM(). #1977