The situation is as follows:
I have a substantial number of tables, with each a substantial number of columns. I need to deal with this old and to-be-deprecated data
I think you can do this with GROUP_CONCAT and GROUP BY:
select length(replace(GROUP_CONCAT(my_col), ',', ''))
from my_table
group by my_col
(untested)
EDIT: the docs don't seem to state that GROUP_CONCAT needs a corresponding GROUP BY, so try this:
select
length(replace(GROUP_CONCAT(col_a), ',', '')) as len_a
, length(replace(GROUP_CONCAT(col_b), ',', '')) as len_b
, length(replace(GROUP_CONCAT(col_c), ',', '')) as Len_c
from my_table