Fix query in edd_get_purchase_stats_by_user. #1974