parsed.org
Count by First Letter by xinu on Jan 10, 2008 02:16 PM

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
RSS