title: How to get the most frequent values from a column using mysql
body: <p>I want to fetch the most ordered items from the database.</p>
  
  <p>For example: I have a following table:</p>
  
  <pre><code>S.no-----Name--------Items
  
  1---------rob------------Pen, pencil, rubber
  
  2---------jim------------rubber, scissor
  
  3--------rick------------pen,pencil
  </code></pre>
  
  <p>I want to fetch most ordered items as shown below</p>
  
  <pre><code>S.no---item-------Count
  
  1------Pen---------2
  
  2------Pencil------2
  
  3------Rubber------1
  
  4------Scissor-----1
  </code></pre>
  
  <p>Below is the query i am using</p>
  
  <pre><code>SELECT name, items, count(items) AS cnt FROM tbl_orderitem GROUP BY items ORDER BY cnt DESC
  </code></pre>
  
  <p>but am not able to achieve the result as i want</p>