【发布时间】:2020-10-13 17:36:09
【问题描述】:
我有一些代码行,但它不会以某种方式工作。我想将此列称为 round() 名称“Diem”以供以后使用,但 Diem >= 1 使其成为无效标识符。有人可以帮忙吗?
select id, name, round(avg(
decode(grade, 'A+', 4.5,'A', 4,
'A-',3.5, 'B+',3, 'B',2.5, 'B-', 2,
'C+', 1.5, 'C', 1, 'C-',0.5
)), 1) as ***DIEM***
from takes t join student s
using (id)
where tot_cred >= 128
and ***DIEM*** >= 1
group by id, name;
【问题讨论】:
标签: sql oracle join select average