| | |
| | | * @param questId 问卷ID |
| | | */ |
| | | @Select("<script> " + |
| | | "SELECT qs.id AS sub_id, ac.choice as option_name, COUNT(ac.user_id) as total, ac.answer_content as answerContent, \n" + |
| | | "SELECT qs.id AS sub_id, ac.choice as option_name, COUNT(ac.user_id) as total, ac.answer_content as answerContent, ac.type,\n" + |
| | | " CONCAT(ROUND( COUNT(ac.user_id) /(SELECT COUNT(*) FROM com_act_questnaire_answer_content WHERE sub_id = qs.id) *100), '%') AS proportion\n" + |
| | | "FROM com_act_questnaire qn LEFT JOIN com_act_questnaire_sub qs ON qn.id = qs.que_Id\n" + |
| | | " LEFT JOIN com_act_questnaire_answer_content ac ON qs.id = ac.sub_id\n" + |