title: Group By a substring in a field
body: <p>I have a cities table in which I have citynames like "Los Angeles (California)".</p>
  
  <p>I tried to extract all the values contained between parantheses with a request, but I couldn't manage to do it well...</p>
  
  <p>The request I tried looked like this :</p>
  
  <pre><code>SELECT cityname FROM cities WHERE cityname LIKE "%(%)%" 
  GROUP BY SUBSTR(cityname, FIND_IN_SET(cityname, '('))
  </code></pre>
  
  <p>Or something like (without group by):</p>
  
  <pre><code>SELECT SUBSTR(cityname, FIND_IN_SET(cityname, '(')) FROM cities 
  WHERE cityname LIKE "%(%)%"
  </code></pre>
  
  <p>What seems to be wrong with these requests?</p>