PL/sql 查询 遇到”不是单组分组函数“问题答:from mydept。在这里是有错误的, 你在选取的column中有一个aggregate 函数(比如求和,计数,平均,总和等),另加一个普通列名。 这样, 就一定要用group by将非aggregate的列名(一个或者多个)包括进去。如:select a, b, sum(c)from Twhere ...group by a, b.select a, b, c, count(d)from Twhere group...
oracle报错:不是单组分组函数答:select p.requi_form,sum(decode(p.requi_form, '0', r.bid_amount, 0)) a,sum(decode(p.requi_form, '1', r.bid_amount, 0)) b,sum(decode(p.requi_form, '2', r.bid_amount, 0)) c,sum(decode(p.requi_form, '3', r.bid_amount, 0)) d,sum(decode(p.requi_...