title: CONCAT() inside GROUP_CONCAT() with count
body: <p>I am trying to get results with group_concat, concat and count functions in MySQL but it gives me error. 
  here is my table</p>
  
  <p><a href="https://i.stack.imgur.com/8ZJo2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ZJo2.png" alt="enter image description here"></a></p>
  
  <p>First, when I try to get count and status with concat, it works fine.<br/></p>
  
  <pre><code>$query="SELECT CONCAT(`status`,':',count(status)) FROM `mytable` GROUP BY status"
  </code></pre>
  
  <p><strong>output:</strong> <br/>
  Hold:2 <br/>
  Completed:3 <br/>
  Cancelled:2 <br/></p>
  
  <p>It's all fine till here. Now I want this output in one row. So I tried using GROUP_CONCAT().</p>
  
  <pre><code>$query="SELECT GROUP_CONCAT(CONCAT(`status`,':',count(status)) SEPARATOR ',') as rowString FROM `mytable` GROUP BY status"
  </code></pre>
  
  <p>but now its giving me error <em>" Invalid use of group functions"</em> </p>
  
  <p><strong>Note:</strong> the same query works if I replace count(status) with some other field from table ( without count). The <code>count()</code> function is causing some problem when used in this manner.</p>
  
  <p><strong>Desired Output</strong> <br /></p>
  
  <p>Hold:2,Completed:3,Cancelled:2</p>
  
  <p>Appreciate your help.</p>