title: Count occurence of attribute values in each row with case-sensitive in sql
body: <p>I have table (<strong>notes_subject</strong>) structure -</p>
  <pre><code>+--------------+-------------+------+-----+---------+----------------+
  | Field        | Type        | Null | Key | Default | Extra          |
  +--------------+-------------+------+-----+---------+----------------+
  | id           | int         | NO   | PRI | NULL    | auto_increment |
  | user_id      | int         | NO   |     | NULL    |                |
  | note_id      | varchar(25) | NO   | MUL | NULL    |                |
  | subject_name | text        | NO   |     | NULL    |                |
  +--------------+-------------+------+-----+---------+----------------+
  </code></pre>
  <p>and data stored in this table -</p>
  <pre><code>+----+---------+--------------+--------------+
  | id | user_id | note_id      | subject_name |
  +----+---------+--------------+--------------+
  | 10 |       2 | UdMs870BSswp | CN           |
  | 12 |       2 | 8stMvslwIGr2 | CN           |
  | 13 |       2 | PB3KNbbFkaUm | cn           |
  +----+---------+--------------+--------------+
  </code></pre>
  <p>Note : CN and cn (lowercase) are different.</p>
  <p>I want to count the occurence of each <code>subject_name</code> by <code>user_id</code> in this table. So I run query -</p>
  <pre><code>SELECT subject_name, COUNT(subject_name) 
  FROM notes_subject where user_id=2 GROUP BY subject_name;
  </code></pre>
  <p>and it fetched -</p>
  <pre><code>+--------------+---------------------+
  | subject_name | COUNT(subject_name) |
  +--------------+---------------------+
  | CN           |                   3 |
  +--------------+---------------------+
  </code></pre>
  <p>But this is not correct result because CN and cn are different.<br />
  and I also want id, user_id, note_id in the result.</p>