SQL group by alias

Hey, A friend at work asked me today about grouping by only part of a column when using MySQL. He wanted to group by a string column, but only part of the string contained what he wanted. So basically I gave him a query that looks similar to the one below: select count(*), substring(string_column, 1, […]