SELECT (0+px1+px2+px3+px4+px5+px6+px7+px8+px9+px10+px11+px12+px13+15) as A1, ((cj1_wy1*cj1_wy1time+cj1_zy3*cj1_zy3time+cj1_gll*cj1_glltime+cj1_mg*cj1_mgtime+cj1_hj*cj1_hjtime+cj1_cz*cj1_cztime+cj1_tj*cj1_tjtime+cj2_dl*cj2_dltime+cj2_zy4*cj2_zy4time+cj2_wy2*cj2_wy2time+cj2_ty3*cj2_ty3time+cj2_kj*cj2_kjtime+cj2_hb*cj2_hbtime+cj2_java*cj2_javatime+cj2_gm*cj2_gmtime)/(0+cj1_wy1time+cj1_zy3time+cj1_glltime+cj1_mgtime+cj1_hjtime+cj1_cztime+cj1_tjtime+cj2_dltime+cj2_zy4time+cj2_wy2time+cj2_ty3time+cj2_kjtime+cj2_hbtime+cj2_javatime+cj2_gmtime)*0.95) as B1, (cj2_ty3*0.7) as C1, ad_pxA2A3, ad_xyB2B3, ad_wtC2C3, Id, uName, uNum, uMajor, uClass, bzjdren, (ad_pxA2A3/(select max(ad_pxA2A3) from tblUser)) as A5, (ad_xyB2B3/(select max(ad_xyB2B3) from tblUser)) as B5, (ad_wtC2C3/(select max(ad_wtC2C3) from tblUser)) as C5, ((0+A1+A5*15)*0.3) as A, ((0+B1+B5*5)*0.6) as B, ((0+C1+C5*30)*0.1) as C, (0+A+B+C) as Total
FROM tblUser
ORDER BY ?????????
(救命啊!晕死啦!)
目标是算出Total,然后按照total排列,并且得出每个记录的序号,例如total最大的为001, totol第二的为002 ....