"id" "type" "parent" "country" "votes" "perCent"
"4177" "3" "4176" "US" "105" "0"// total of all the below
"4178" "10" "4177" "US" "15" "0"
"4179" "10" "4177" "US" "50" "0"
"4180" "10" "4177" "US" "25" "0"
"4181" "10" "4177" "US" "5" "0"
"4182" "10" "4177" "US" "10" "0"
在MySQL中,是有可能選擇具有的選票10%的行。在這裏,id = 4177
擁有該類別的總票數。基於此,可以選擇type = 10 and parent = 4177
和哪個有10% or more
的選票?如何選擇10%票數的行?
有什麼問題。你做了什麼? –
'從表格中選擇id,其中type = 10,votes> =總票數的10%'si我正在做的事情。總票數在'id = 4177'。可能做這樣的事情? – Norman
如果總投票數是4177,那麼投票總數的10%是417.7。我是對的嗎? –