title: Need mysql query to get students PASS, FAIL and COUNT in single query
body: <p>I am having a table as below:</p>
  
  <pre><code>id    studentName   Marks
  
  1        X           60
  
  2        Y           25
  
  3        Z           50
  </code></pre>
  
  <p>Here the pass Marks is 50 and above</p>
  
  <p>My output should be</p>
  
  <pre><code>id    studentName   Marks  status  totalCount
  
  1        X           60     PASS       2
  
  2        Y           25     FAIL       1
  
  3        Z           50     PASS       2
  </code></pre>
  
  <p>Here the total count of pass is 2 as well as total number of fail is 1.</p>
  
  <p>How can this be done using MYSQL QUERY.</p>
  
  <p>thanks in advance.... </p>