學生成績 請問科目的級名次在哪裡?

本文由 Andy Seto 在 2021-08-25 發表於 "WebSAMS 討論區" 討論區

標籤:
  1. 58278335

    Andy Seto
    Expand Collapse

    文章:
    1
    讚:
    0
    Select
    a.SCHYEAR,
    a.TIMESEQ,
    a.CLASSLEVEL,
    b.CLASSCODE,
    b.CLASSNO,
    a.STUID,
    b.CHNAME,
    a.SUBJCODE,
    a.SYSSCORE,
    a.OMSUBJGRP,
    a.OMSUBJDIV,
    a.OMSUBJ,
    a.OMSUBJGRPBASE,
    a.OMSUBJDIVBASE,
    a.OMSUBJBASE
    From
    TB_ASR_SUBJASSESSDATA a
    Left outer join VW_STU_LATESTSTUDENT b On a.STUID = b.STUID and a.SCHYEAR=b.SCHYEAR
    Where
    a.SUBJCODE='165' and a.SCHYEAR=? and a.TIMESEQ=?

    想抽取全校英文分數及級排名,用以上SQL只抽到班名次
     
    #1 Andy Seto, 2021-08-25
  2. 58521906

    edb-catherinewschan
    Expand Collapse

    文章:
    213
    讚:
    0
    你好,

    可以參考一下

    Select
    a.SCHYEAR,
    a.TIMESEQ,
    a.CLASSLEVEL,
    b.CLASSCODE,
    b.CLASSNO,
    a.STUID,
    b.CHNAME,
    a.SUBJCODE,
    a.SYSSCORE,
    a.OMCLASS '科目班名次',
    a.OMCLASSLVL '科目級名次',

    a.OMSUBJGRP,
    a.OMSUBJDIV,
    a.OMSUBJ,
    a.OMSUBJGRPBASE,
    a.OMSUBJDIVBASE,
    a.OMSUBJBASE
    From
    wsadmin.TB_ASR_SUBJASSESSDATA a
    Left outer join wsadmin.VW_STU_LATESTSTUDENT b On a.STUID = b.STUID and a.SCHYEAR=b.SCHYEAR
    Where
    a.SUBJCODE='165' and a.SCHYEAR=? and a.TIMESEQ=?
     
    #2 edb-catherinewschan, 2021-08-25