我有两个表:“成员”和“问题”。每个成员可以提出多个问题。
我想检索被问到超过 3 个问题的成员的数量
到目前为止我的查询:
SELECT DISTINCT q.question_id, COUNT( q.question_id ) AS question_id_count
FROM member m
inner join question q on m.member_id = q.member_id
GROUP BY m.member_id
HAVING (
COUNT( q.question_id ) >3
)
我可以做些什么来改进这个查询?谢谢