I have two columns SI_NUM and SI_MINUTES from the same table and I need to either get average of them by something like avg(si_num,si_minute), avg(column[si_num],column[si_minute]) or even just do a mathematical calculation of division between the two columns. But I don't know how to do this can anyone help me out, here is what I have tried so far.
SELECT CD_CODE,SU_CODE,SU_FNAME,SU_LNAME,SI_NUM,SI_MINUTE,
AVG(SI_NUM-SI_MINUTE) AVG
FROM FCDOPER,FSURGN,FSITEMS
WHERE CD_SEQU = SI_CD_SEQU and SU_SEQU = SI_SU_SEQU and CD_CODE = '56001'
Thanks
SELECT CD_CODE,SU_CODE,SU_FNAME,SU_LNAME,SI_NUM,SI_MINUTE,
AVG(SI_NUM-SI_MINUTE) AVG
FROM FCDOPER,FSURGN,FSITEMS
WHERE CD_SEQU = SI_CD_SEQU and SU_SEQU = SI_SU_SEQU and CD_CODE = '56001'
Thanks