如何根据条件 mysql 获取用户总数?

how to get the total number of users depending on a condition mysql?

我想获得看过7个视频的用户总数。 我试过这种方式,但它按用户看过的视频对我进行分组

SELECT users.name,count( lecciones_users.uuid ) AS total_see_all_video FROM lecciones_users 
LEFT JOIN users ON users.uuid=lecciones_users.uuid 
GROUP BY lecciones_users.uuid,users.name 

查询响应

我需要的答案是 total_see_all_video = 9

-- Count the users...
select count(*) as total_see_all_video
from users u
where 
      -- ... if the number of videos watched is 7
      7=(select count(*) 
         from lecciones_users lu
         where lu.uuid=u.uuid)