Is it possible in SQL to do grouping by LIKE patterns? I would like to achieve something like this:
id|name 1 | Mike 2 | Bob 3 | Bill 4 | Alice
and then doing query like: SELECT name from users group by _pattern_
For example I would like to get groups by matching patterns 'B*', '*l*' and 'Mike'
would give the output:
B* | Bob
| Bill
*l* | Bill
| Alice
Mike| Mike