我有下面的代码
$sql = "SELECT
date1,
date2,
userid,
jobid,
result,
price,
total,
(SELECT distinct SUM(total1) FROM Jobs) as total2
FROM
Jobs
WHERE
total <= total1
GROUP BY
'$newphrase', '$newphrase1', '$user', '$job', result
ORDER BY
jobid DESC, userid DESC";
$result = mysql_query($sql);
它输出总计,但输出低于输出的 3 倍
SN01 0.17 15 2.55 25.05
SN01 0.50 15 7.5 25.05
SN01 1 15 15 25.05
25.05 输出 3 次,我只需要一次。我已经尝试过不同的和我能想到的一切请帮助它让我发疯