select count(*) as total_non_empty,
       min(length(invite_code)) as min_len,
       max(length(invite_code)) as max_len,
       count(distinct length(invite_code)) as distinct_len_count
from users
where invite_code is not null and invite_code <> '';

select '---shape---';
select regexp_replace(invite_code, '[A-Z]', 'A', 'g') as shape, count(*)
from users
where invite_code is not null and invite_code <> ''
group by 1
order by count(*) desc
limit 20;

select '---sample-id-code---';
select id, invite_code
from users
where invite_code is not null and invite_code <> ''
order by id asc
limit 30;
