John Jason Jordan wrote:
SELECT DISTINCT ( SUBSTR( "QuestionCode", 1, 9 ) ) FROM "MainBank"
ORDER BY ( SUBSTR( "QuestionCode", 1, 9 ) )

So far so good. Now I need the number of questions in each category,
and that is what has me stumped. I tried adding COUNT as follows:

SELECT DISTINCT COUNT ( SUBSTR( "QuestionCode", 1, 9 ) ) FROM
"MainBank" ORDER BY ( SUBSTR( "QuestionCode", 1, 9 ) )

But that just returns the number 7,349. I need the individual count for
each category, and I can't figure out the syntax to accomplish this.
Any suggestions welcome!
In other words you want the count for each GROUP of records.


SELECT Count( * ) FROM "MainBank"
GROUP BY ( SUBSTR( "QuestionCode", 1, 9 ) )




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to