title: How to Fetch Monthly Attendance report by student?
body: <p>I got student_id=14 through form post and I need to fetch attendance report for the student_id as below </p>
  
  <pre><code>CLASS   STUDENT_ID  YEAR    MONTH   TOTAL_CLASSES   TOTAL_PRESENT
  
  11      14      2016       April          21             20
  11      14      2016       May            25             25
  11      14      2016       June           30             29
  11      14      2016       July           18             18
  11      14      2017       January        28             28
  </code></pre>
  
  <p>Here TOTAL_CLASSES represents total number days school is open and TOTAL_PRESENT represents total number of says a student is present out of TOTAL_CLASSES.</p>
  
  <p>From HTML Form I GOT only student_id=14 and I need to fetch and show record as above.</p>
  
  <p>Please see sqlfiddle here to support my answer  <a href="http://sqlfiddle.com/#!9/63b6a/3" rel="nofollow">http://sqlfiddle.com/#!9/63b6a/3</a></p>
  
  <p>In my table remarks represents 1,2,3 for present and 0 for absent.</p>