title: SQL How do I select an entity that occurs at least twice
body: <p>In the attendance column in the ChildProgram relation, there are 1s and 0s which represents present and absent respectively. How do I select students that are absent for at least 2 times? (for this case, Hannah and Joash). The students who are selected will be displayed in an "email message". </p>
  
  <p><img src="https://i.stack.imgur.com/fp0ey.png" alt="ChildProgram relation"></p>
  
  <p><img src="https://i.stack.imgur.com/Cjbsx.png" alt="This is the output of what is needed"></p>
  
  <pre><code>SELECT DISTINCT Concat('Dear Mr and/or Mrs ', C.lastname, 
                  ', we are writing concerning your child’s attendance. ', 
                  C.firstname, ' was absent from the subject ', CP.programid, 
                  ' for at least 2 lessons.') 'Content of Email' 
  FROM   child C, 
         childprogram CP 
  WHERE  C.firstname = CP.firstname 
  </code></pre>