title: Display Percent of value mysql
body: <p>I have the following data table and data:</p>
  
  <pre><code>mysql&gt; describe school_data_sets_numeric_data;
  +--------------+----------------+------+-----+---------+----------------+
  | Field        | Type           | Null | Key | Default | Extra          |
  +--------------+----------------+------+-----+---------+----------------+
  | id           | int(11)        | NO   | PRI | NULL    | auto_increment |
  | data_set_nid | int(11)        | NO   |     | NULL    |                |
  | school_nid   | int(11)        | NO   |     | NULL    |                |
  | year         | int(11)        | NO   |     | NULL    |                |
  | description  | varchar(255)   | NO   |     | NULL    |                |
  | value        | decimal(18,12) | NO   |     | NULL    |                |
  +--------------+----------------+------+-----+---------+----------------+
  6 rows in set (0.00 sec)
  
  +----+--------------+------------+------+-------------------+------------------+
  | id | data_set_nid | school_nid | year | description       | value            |
  +----+--------------+------------+------+-------------------+------------------+
  | 54 |        19951 |      19944 | 2008 | Asian             |  75.000000000000 |
  | 51 |        19951 |      19944 | 2008 | White             | 200.000000000000 |
  | 52 |        19951 |      19944 | 2008 | African American  | 100.000000000000 |
  | 53 |        19951 |      19944 | 2008 | Hispanic          |  50.000000000000 |
  | 55 |        19951 |      19944 | 2008 | Native American   |   9.000000000000 |
  </code></pre>
  
  <p>I want to display an average of the data instead of raw numbers. I want to do this in raw sql.</p>
  
  <p>Example:</p>
  
  <pre><code>+----+--------------+------------+------+-------------------+------------------+
  | id | data_set_nid | school_nid | year | description       | average          |
  +----+--------------+------------+------+-------------------+------------------+
  | 54 |        19951 |      19944 | 2008 | Asian             |  17.28%          |
  | 51 |        19951 |      19944 | 2008 | White             | 46.06%           |
  | 52 |        19951 |      19944 | 2008 | African American  | 23.04%           |
  | 53 |        19951 |      19944 | 2008 | Hispanic          |  11.52%          |
  | 55 |        19951 |      19944 | 2008 | Native American   |  2.07%           |
  </code></pre>
  
  <p>What is the best way to do this? Keep in mind there will be multiple data sets and years.</p>