title: SQL statement - how to build a timeline graph
body: <p>Hi I have a table with following columns:</p>
  
  <ul>
  <li>ID</li>
  <li>student_id</li>
  <li>score (int)</li>
  <li>scanned_date</li>
  <li>close_date.</li>
  </ul>
  
  <p>A script is run every week. it collects a score for each student every week. Each week the scores remain the same. When the script is run for the first time, it enters ID, Student_id, score, scanned_date and Null for Close_date for each student.</p>
  
  <p>For each additional scan, if the score is same as last week's score then, the script does nothing. 
  But if a new score is found, then it enter's the date in the close_date field and enters a new row containing id, student_id, score, scanned_date and Null for close date.</p>
  
  <p>I'm trying to build a sql statement which will help me build a timeline graph. For each distinct scanned_date, it will return sum of all the scores for each student so that I can build a graph. </p>
  
  <p>is that possible to do? </p>
  
  <p>-Maria</p>