title: Loop through a table in Oracle PL/SQL
body: <p>I have done SQL queries but have not done any procedure writing that uses loops so I am at a lost here. I'm using Oracle SQL Developer. Can be done in SQL or PL/SQL</p>
  
  <p>I have a table that resemble this:</p>
  
  <pre><code>Person_ID Score Name  Game_ID
  1         10    jack  1
  1         20    jack  2
  2         15    carl  1
  2         3     carl  3
  4         17    steve 1
  </code></pre>
  
  <p>How can I loop through this table so that I can grab a players total score for all games played. Result would be like this:</p>
  
  <pre><code>Person_ID Score Name
  1         30    jack
  2         18    carl
  4         17    steve
  </code></pre>
  
  <p>Also extra credit what If i wanted to just grab say games 1 2?</p>
  
  <hr>
  
  <p><strong>EDIT: Sorry for not being clear but I do need to do this with a loop even though it can be done without it.</strong></p>