Average of multiple columns

前端 未结 5 1928
执念已碎
执念已碎 2020-12-01 14:13

I have a table called Request and the data looks like:

Req_ID    R1   R2   R3   R4   R5

R12673    2    5    3    7    10
R34721    3    5    2    1    8
R27         


        
5条回答
  •  情书的邮戳
    2020-12-01 14:47

    If the data is stored as INT, you may want to try

    Average = (R1 + R2 + R3 + R4 + R5) / 5.0
    

提交回复
热议问题