■ 자동으로 합계/소계 만들기

----------------------------------------------------------------------------------------------------

SELECT

    COURSE_ID

   ,STUDENT_ID

   ,SUM(SCORE)

FROM  TBL_SCORE

WHERE COURSE_ID = 'L0011'

GROUP BY

    COURSE_ID

   ,STUDENT_ID;

/*

 

COURSE_ID STUDENT_ID SUM(SCORE)

--------- ---------- ----------

L0011     C0801              68

L0011     C0802              98

*/

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요