sqlite - Group by regex count -
id 1001 2001 2002 3001 3002 3003
how group id
column first digit 1, 2, 3
? mean below:
select count(*) my_tbl group expr_id_1st_digit; count(*) 1 2 3
try this:
select count(*) (select substr(id, 1, 1) mygroup table1) group mygroup
Comments
Post a Comment