Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试玩不同的 mysql joins/selects 来获取至少有 25 个帖子或评论的所有用户。有
users id valid posts id user_id comments id user_id
在那里,我试图让所有用户记录至少 25 条评论+帖子..
请帮忙!
尝试
select u.* from users u left outer join posts p on p.user_id = u.id left outer join comments c on c.user_id = u.id group by u.id having (count(p.id) + count(c.id)) >= 25