如何在avg
结果的左侧有别名?
我有这个平均子查询
SELECT AVG(GRADE) AS GRADE
FROM (
SELECT AVG(NUMERIC_GRADE) AS GRADE
FROM GRADE
WHERE STUDENT_ID = 5
AND SECTION_ID = 17
GROUP BY GRADE_TYPE_CODE
) myInnerTable;
我得到了一个结果
GRADE
----------
82.3
我想将它与我的平均结果结合起来,我必须使用另一列吗?
SELECT INITCAP(GRADE_TYPE_CODE) AS "Average is:"
FROM GRADE;
我想要这样的东西
GRADE_TYPE_CODE GRADE
----------------------- ------
Average Is: 82.3