- SQL code
create table t1( std_id number(4), student_name varchar2(50), subj1 number(3), subj2 number(3))SELECT subj1+subj2 total_marks, std_idFROM marksWHERE subj1 > AVG(subj1) AND subj2 > AVG(subj2)ORDER BY total_marks;
为什么执行不过去呢?
报avg不能使用,为什么啊?
------解决方案--------------------------------------------------------
楼上正解哦