title: SQL query to select percentage per Group
body: <p>I have a table named Grades which contains result of each year.<br>
  I want to select percentage of students who got more than 70 percent marks in each year.<br>
  Like e.g. for year 2012, 40 out of 100 got more than 70 percent. So the percentage for year 2012 is 40 %. <br>
  I did it in sub query but I was wondering if it is possible without using sub query. <br>
  I am using Teradata Version 6, which supports all basic sql queries.<br>
  My table schema is.</p>
  
  <pre><code>Table name: Grades&lt;br&gt;
  Columns: Name, Marks, Year.
  </code></pre>
  
  <p>The best I could do is:<br></p>
  
  <pre><code>select (count(marks)/count(*))*100.0
  from Grades
  where marks &gt; 70
  Group by year;
  </code></pre>