d***e 发帖数: 193 | 1 考古出来的一道题,多谢beijing大牛及各位大牛:
Survey_log (uid, action, question_id, answer_id, q_num, timestamp)
action = 'show', 'answer', 'skip'
answer_id = when action=answer, null for skip and show
q_num is the numeral/order of the question in the session
uid, eventtype, quid, aid, qorder, timestamp
5, 'show', 285, null, 1, 141425411
5, 'answer', 285, 124124, 1, 141425415
5, 'show', 369, null, 2, 141425416
5, 'skip', 369, null, 2, 141425417
1. write a sql query to identify the one question that has the highest
answer rate
2.Supposer an user has answered question with qid = 1. What question should
be presented to this user next? | B*****g 发帖数: 34098 | 2 1 找出每道题的answer rate,然后排序,然后取最大的。(别问我,我也不知道啥是
answer rate)
2 没看懂题,纯属胡猜。找出所有答了Q1的人(uid,qorder),按(uid,qorder+1(
也需要跳过skip的题))找出quid,然后看哪个quid出现的次数多。
补充:这题见过,应该没作答。理由很简单,上下column都对不上。出题人打屁屁
【在 d***e 的大作中提到】 : 考古出来的一道题,多谢beijing大牛及各位大牛: : Survey_log (uid, action, question_id, answer_id, q_num, timestamp) : action = 'show', 'answer', 'skip' : answer_id = when action=answer, null for skip and show : q_num is the numeral/order of the question in the session : uid, eventtype, quid, aid, qorder, timestamp : 5, 'show', 285, null, 1, 141425411 : 5, 'answer', 285, 124124, 1, 141425415 : 5, 'show', 369, null, 2, 141425416 : 5, 'skip', 369, null, 2, 141425417
| d***e 发帖数: 193 | 3 谢谢beijing大牛牛!
我也觉得这题挺奇怪的
【在 B*****g 的大作中提到】 : 1 找出每道题的answer rate,然后排序,然后取最大的。(别问我,我也不知道啥是 : answer rate) : 2 没看懂题,纯属胡猜。找出所有答了Q1的人(uid,qorder),按(uid,qorder+1( : 也需要跳过skip的题))找出quid,然后看哪个quid出现的次数多。 : 补充:这题见过,应该没作答。理由很简单,上下column都对不上。出题人打屁屁
|
|