title: SQL Selecting average of just two rows
body: <p>I am currently just finishing up an SQL Database project for school. </p>
  
  <p>I have used W3school, Google and read over several of the SQL average questions</p>
  
  <p>I want to write a select statement that will allow me to work out the average grade for each programme which is identified here by Pro_id. I know that you can use </p>
  
  <p><code>SELECT COUNT(column_name) FROM table_name</code> for the average of the column. I want to get the average of specific rows within the Column </p>
  
  <pre><code>SELECT GPA from enroll
  WHERE Pro_id='4010'
  </code></pre>
  
  <p>I thought the above would work but got :</p>
  
  <blockquote>
    <p>ERROR 1054 (42S22): Unknown column 'GPA' in 'field list'</p>
  </blockquote>
  
  <pre>+------------+--------+--------+------+-------+
  | Student_id | Mod_id | Pro_id | GPA  | Grade |
  +------------+--------+--------+------+-------+
  | 04655236   | 111111 | 4010   | 4.84 | A+    |
  | 04655236   | 22222  | 4010   | 3.23 | B-    |
  | 05655236   | 22222  | 4010   | 3.84 | A-    |
  | 06655236   | 33333  | 4011   | 2.84 | B-    |
  | 07655236   | 44444  | 4011   | 2.23 | C-    |
  | 08655236   | 55555  | 4012   | 2.23 | C-    |
  +------------+--------+--------+------+-------+</pre>
  
  <p>Any help would be greatly appreciated.</p>