title: sql query to count when question_id is same and user_id is different
body: <p>I have following table:</p>
  
  <pre><code> res_id  quiz_id     sender_id   user_id     question_id   points
    1         1           2      33       20      0
    2         1           2      34       20      0   
    3         1           2      24       20      0
    4         2           3      22       2       1
    5         3           4      3        6       1
  </code></pre>
  
  <p>I want to get result if quiz_id is same for three rows and question_id is same and sender_id is same make sure user_id is different and points are 0. If this condition is satisfied pass value of 1 to the php variable here is example:</p>
  
  <pre><code>res_id  quiz_id     sender_id   user_id     question_id   points
    1         1           2      33       20      0
    2         1           2      34       20      0   
    3         1           2      24       20      0
  </code></pre>