mysql - generate a query that show the times that questions get wrong -
i have table named countwronganswer
columns cwa_id
, question_num
. how can generate table query shows 2 columns, 1 column lists question_num
, second column lists number of times cwa_id
related question_num
.
question number |total # of mistake | 1 12 2 22 ..etc
attention: question asked without awareness of existence of count or groupby method because of knowledge level @ state. count() or groupby() key generate 2nd column of total # values did not aware of completely, therefore, attempt, @ point of time, write code data close meaningless. vote if possible if think useful or resolved issue.
probably this
select question_num, count(cwa_id) total_mistakes countwronganswer group question_num
Comments
Post a Comment