title: SQL command for getting average marks
body: <p>Consider the following table marks part of a school database containing the following columns</p>
  <ul>
  <li><strong>Student_id</strong>: Storing the id of the student</li>
  <li><strong>Course</strong>: Storing the name of the course</li>
  <li><strong>Marks</strong>: Storing the marks obtained by the student in the particular course</li>
  </ul>
  <p>Write a query to determine the average marks obtained by students. Order the results in the descending order of average marks. In case the average marks are same for two students, student with a lower student_id should appear first.</p>
  <p>The output should be of the form</p>
  <pre><code>|Student_id|avg(marks)|
  </code></pre>
  <p>My query:</p>
  <pre><code>SELECT Student_id, avg(Marks) FROM Marks ORDER BY Student_id DESC 
  </code></pre>
  <p>Please let me know what am I doing wrong here? SQL is new for me.</p>