I am updating my Drinks Dictionary iPhone app which uses a sqlite database. I need to create a query to count how many items begin with the letter 'a', 'b', 'c', etc....
I can get as far as 'select DISTINCT substr(name,1,1) FROM drinks;
How can I apply a GROUP BY clause or something else so in one query I can get every unique first character and a count of how many drinks start with that character?
Thanks
Zach
Tags:
-
▶ Reply to This