Home > database >  Statistics the score of the same name of the person, how do you write in SQL ah, thank you
Statistics the score of the same name of the person, how do you write in SQL ah, thank you

Time:09-20

Statistics with the score of the same name of the person, how do you write in SQL ah, thank you

Two fields a FZR fz, table name ZJXM

Hope the statistics zhang SAN in total scores, li si a total score, Zhao Wu total score, then output out

Because fields FZR with fz were set number, so more troublesome,,

Bother to ask: $SQL="select FZR that sum (fz) as fsaa from ZJXM group by FZR"; How do you go to change!


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
FZR | fz
Zhang SAN, li si,,, Zhao Wu | dec, 15, and 20
Li si,,,, zhang SAN | 60,,,,
30Zhang SAN,,, Zhao Wu |, 20,,,
2.5

CodePudding user response:

https://blog.csdn.net/pjymyself/article/details/81668157
  • Related