title: MySQL split comma separated values and GROUP BY result
body: <p>I have table as bellow.</p>
  
  <p>t1</p>
  
  <pre><code>+---------+-------------+ 
  | id      | value       |  
  +---------+-------------+ 
  | 1       |  A,B,C,D    | 
  | 2       |  B,C,E,F    | 
  | 3       |  E,F,G,H    | 
  | 4       |  G,A,E,N    | 
  +---------+-------------+ 
  </code></pre>
  
  <p>I want a query split value and then group by result. like</p>
  
  <pre><code>+-------+ 
  |result |  
  +-------+ 
  |  A    | 
  |  B    | 
  |  C    | 
  |  D    | 
  +-------+ 
  </code></pre>
  
  <p>I try following but it's fail.</p>
  
  <pre><code>SELECT SUBSTRING_INDEX(value, ',', 1) as result
  FROM t1 GROUP BY result
  </code></pre>
  
  <p>anyone to give better hint thanks</p>