[thelist] SQL: COUNTing and SUMming and whatnot

Joshua Olson joshua at waetech.com
Tue Oct 15 15:50:01 CDT 2002

----- Original Message -----
From: "Chris W. Parker" <cparker at swatgear.com>
Sent: Tuesday, October 15, 2002 4:18 PM

> what i'd like to do is pull back a recordset (i'm using vbscript and
> access btw) that gives me...
> 1. a count total for each item in #2. (i.e. how many times was productB
> recorded?)
> 2. a count total for all records in the db. (i.e. there are 500 records
> in our database.)
> 3. the name of each item in #1.
> i don't think this is possible without multiple queries, but i really
> don't know much more about sql than the basics. i imagine the recordset
> could look like this.

It may be possible with a single query, but this will depend on the database
you are using.  Which database is it?


More information about the thelist mailing list