B站3月24日校招笔试SQL题
SELECT CASE WHEN t1.score >= 85 THEN '非常满意' WHEN t1.score >= 70 THEN '满意' WHEN t1.score >= 60 THEN '接受' ELSE '不满意' END AS 'like', count( t1.user_id ) AS 'total', ROUND( SUM( t2.under_time - t2.log_time )/ COUNT( t1.user_id )/ 100, 3 ) AS 'time' FROM user_action_tb AS t1 JOIN login_tb AS t2 ON t1.user_id = t2.user_id GROUP BY `like` ORDER BY `total` DESC;
题目不太记得了,大概思路是这样,当时死活不记得 SQL 语法 CASE 用法,导致做题 0 分, 。
#如果校招重来我最想改变的是#