Article View: borland.public.vdbase.data.sql
Article #1028Re: Aggregate functions on rowsets
From: hirschv at mindspring dot com Ke...
Date: Wed, 03 Jun 1998 00:00
Date: Wed, 03 Jun 1998 00:00
28 lines
1577 bytes
1577 bytes
EDDIE SHUM <econshum@netvigator.com> wrote: >Say, for example, you have a SQL table containing data on name of >students, Place of birth (like a given state in the US) and their text >score. Suppose you want to know what is the average score for students >born in Kansas. In your applicatin, you would normally carry out a >filter with the help of the data button components provided by VDB7 >which are very good. Now, you have a subset of your original rowset or >a sub-rowset. What is OODML function or command for doing sum, average, >etc.? > >I have tried the "calculate aggregates" function in VDB7 and it always >returns the result for the whole rowset and not a subset. Could someone >shed some light on this? This is off the top of my head, but try something like: select avg( somefield ) from tablename where bornInfield = 'Kansas' Ken --- Ken Mayer [TeamB] Golden Stag Productions http://www.mindspring.com/~hirschv/homepage.htm http://www.mindspring.com/~hirschv/dbase/dbase.htm Please respond in the newsgroup unless explictly asked otherwise
Technical Details
Message-ID:
<35749c82.3632442@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3573C716.5B3C@netvigator.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,b9032b9bcf80acce X-Google-Attributes: gidff5a1,public From: hirschv at mindspring dot com (Ken Mayer [TeamB]) Subject: Re: Aggregate functions on rowsets Date: 1998/06/03 Message-ID: <35749c82.3632442@forums.borland.com> X-Deja-AN: 358980755 References: <3573C716.5B3C@netvigator.com> Organization: Golden Stag Productions Reply-To: hirschv@nospam.mindspring.com Newsgroups: borland.public.vdbase.data.sql