: SELECT ucase( lastname ) as surnameuc, lastname as surname, count( ucase( lastname ) ) as count, lastname FROM WHERE lastname<>"" AND lastname<>"Unknown"AND lastname<>'[--?--]' GROUP BY surname ORDER by lastname