title: SQL trouble with average function
body: <p>I am very new to SQL and am having a lot of trouble wrapping my head around certain things.  The following code</p>
  
  <pre><code>SELECT Treated.ProgScore, Patient.Ethnicity
  FROM Patient
      JOIN City
          ON Patient.ZIP = City.ZIP
      JOIN Treated
          ON Patient.SSN = Treated.PSSN
  WHERE City.Cname != 'Dallas';
  </code></pre>
  
  <p>produces the following data.  I would like to extract the average ProgScore of each ethnicity and list it from lowest to highest average ProgScore</p>
  
  <p>PROGSCORE ETHNICITY                              </p>
  
  <hr>
  
  <pre><code>     2 Japanese                                 
       5 Caucasian                                
       9 Caucasian                                
       2 African                                  
       3 Japanese                                 
       7 Caucasian                                
      10 Japanese                                 
       8 Caucasian                                
       1 African                                  
       4 Japanese                                 
       7 Caucasian                                
  </code></pre>
  
  <p>Is there a way to do this? I would like my output to look like this.</p>
  
  <p>Average   ETHNICITY                              </p>
  
  <hr>
  
  <pre><code>  4.75 Japanese                                 
     7.2 Caucasian  
  </code></pre>
  
  <p>Thanks for any help</p>