Is there any why to use substr in group by clause?
<p>I have a table T and a column in that table C this column C is combination of two strings (say, country, city) now I want to get the count of total entries for particular country.some thing like below</p>

<blockquote>
  <p>select count(*), country from T group by substr(country, 0, 20);</p>
</blockquote>

<p>How to achieve this?</p>