select substr(some_column,1,10),count(*)But you can get the same result by doing
from some_table
group by substr(some_column,1,10)
select short_version,count(*) fromSam thought of this. The "a" is there as an alias name for the subselect. You don't have to use it, but if you don't put it in there, Derby rejects the SQL.
(
select substr(some_column,1,10) as short_version
from some some_table
) a
group by short_version
No comments:
Post a Comment