title: Find the Max and Min of a count SQL
body: <p>The question is: For each department, list the max and min enrollment across all sections of courses they offered, considering only those sections that had some enrollment - that is, don't worry about those sections that had no students taking that section.</p>
  
  <pre><code>Department(dept_name, building, budget)
  Section(course_id, sec_id, semester, year, building, room_number, time_slot_id)
  student(student_id, name, major, tot_cred)
  takes(student_id, course_id, sec_id, semester, year, grade)
  course(course_id, title, dept_name, credits)
  </code></pre>
  
  <p>The query: </p>
  
  <pre><code>SELECT * 
    FROM course 
    NATURAL JOIN (SELECT count(student_id) AS tot 
    FROM takes NATURAL JOIN section GROUP BY course_id)
  </code></pre>
  
  <p>^^^ Gives the enrollment. Need to find Max and Min</p>