比较基础,首先根据video_id字段连接两张表,然后根据video_type进行分组,之后就是统计出去重后的用户数量,然后根据去重数量逆序排列取第一个即可

SELECT b.video_type, COUNT(DISTINCT(user_id))
FROM user_view_tb AS a INNER JOIN video_info_tb AS b
ON a.video_id = b.video_id
GROUP BY b.video_type
ORDER BY COUNT(DISTINCT(user_id)) DESC
LIMIT 0, 1