摘要:
with T as (select GId, gname, gcolour, gwithin, gsize, sum(gnumber) gnumber from t_goods group by GId, gname, gcolour, gwithin, gsize union all select gid, gname, null, null, '小计', sum(gnumber) from t_goods group by gid, gname) select rownum seq, decode(rn, 1, gid) gid, decode(rn, 1, gname) 阅读全文