Hello

I have a table with a primary key consisting of three columns:  Book, Chapter, 
Verse.

I'd like to produce a results set that contains 1 row for each chapter of each 
book, showing the total verses in that chapter.

I know enough SQL to know I can get the total number of verses in a chapter of 
a book with

SELECT COUNT(VERSE) AS TOT_VERSES WHERE BOOK = 1 AND CHAPTER = 1

... but not enough to produce the following ...

BOOK      CHAPTER    TOT_VERSES
  1          1           31
  1          2           22
  1          3           99     ETC., ETC.

I would appreciate any help you care to give as I continue to learn SQL.

Thanks.

Danny
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to