pl/sql对表中相同字段求和,并把和放到后面一列
发布网友
发布时间:2022-05-16 09:19
我来回答
共1个回答
热心网友
时间:2023-08-23 13:18
pl/sql对表中相同字段求和,并把和放到后面一列
<a href="https://www.baidu.com/s?wd=select&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dBPjT4P1mvPynsnWwhrjR40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnH64PjRsn104PW63rHDsrjnsn0" target="_blank" class="-highlight">select</a> <a href="https://www.baidu.com/s?wd=left&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dBPjT4P1mvPynsnWwhrjR40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnH64PjRsn104PW63rHDsrjnsn0" target="_blank"class="-highlight">left</a>(字段1,2),<a href="https://www.baidu.com/s?wd=sum&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dBPjT4P1mvPynsnWwhrjR40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnH64PjRsn104PW63rHDsrjnsn0" target="_blank" class="-highlight">sum</a>(字段2) from 表名 group <a href="https://www.baidu.com/s?wd=by&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dBPjT4P1mvPynsnWwhrjR40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnH64PjRsn104PW63rHDsrjnsn0" target="_blank" class="-highlight">by</a> <a href="https://www.baidu.com/s?wd=left&tn=44039180_cpr&fenlei=mv6quAkxTZn0IZRqIHckPjm4nH00T1dBPjT4P1mvPynsnWwhrjR40ZwV5Hcvrjm3rH6sPfKWUMw85HfYnjn4nH6sgvPsT6KdThsqpZwYTjCEQLGCpyw9Uz4Bmy-bIi4WUvYETgN-TLwGUv3EnH64PjRsn104PW63rHDsrjnsn0" target="_blank" class="-highlight">left</a>(字段1,2)