答案 0 :(得分:0)
如果要对Sum进行分组,请在 group by 子句中添加列,如下所示
SELECT SUM(JL_Price + PART_PRICE) , cloumn_name
FROM GMS_Job_List, GMS_Parts, GMS_Appointments
WHERE JL_ID=AP_Job_Type
AND Part_ID=AP_Part_Used
AND instr((AP_Job_ID),nvl(:JOB,AP_Job_ID))>0
GROUP BY cloumn_name
这里是column_name我用来对总和进行分组