title: SQL query - dynamic sub query
body: <p>I am having trouble trying to create a query to:</p>
  
  <p>Select all the students who have not completed <em>all</em> peer review's for a particular week. </p>
  
  <p>background: Each week, every student must peer review their peers in the same group.</p>
  
  <p>Each group can be a different size, which is the problem I am having. </p>
  
  <p>this is my current test data:</p>
  
  <p><img src="https://i.stack.imgur.com/2a93b.png" alt="peer review table "></p>
  
  <p><img src="https://i.stack.imgur.com/KYQBP.png" alt="student table"></p>
  
  <p>Table 1: peer review table <br/>
  Table 2: student table.</p>
  
  <p>This is my inital query, groups all the students based on the amount of peer review's they've made. I now need to to check if the <code>count(*)</code> is less than the size of the group for each student :</p>
  
  <pre><code>SELECT * 
  FROM peerreview
  RIGHT JOIN student 
  ON student. studentID = peerreview.reviewer
  WHERE week = 11
  GROUP BY studentID
  HAVING Count(*) &lt; ????
  </code></pre>