To get a count of rows by the first letter of the last name (lname):
sql> select count(1), substr(lname, 1, 1) as first from some_table group by first;
Thanks to McG for the tip.
countsqlsubstr
You need to determine if there are any duplicates in a column; here's a quick way to do that with a couple count() functions:
sql> select count(field), count(distinct field) from table where...
If the counts are the same, you're duplicate free!
Thanks to McG for the tip.
countdistinctduplicatesql