LeetCode-SQL-578. 查询回答率最高的问题

SELECT 
    question_id AS survey_log
FROM
    survey_log
GROUP BY question_id
ORDER BY COUNT(answer_id) / COUNT(IF(action = 'show', 1, 0)) DESC
LIMIT 1;
发布了145 篇原创文章 · 获赞 2 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/m0_37302219/article/details/104983828