Re: Getting the pass mark

2001-09-05 Thread Adams, Bill TQO
"Adams, Bill TQO" wrote: > SELECT SUM( test=x ) AS total, COUNT(*) AS pass FROM table WHERE text=x AND > value BETWEEN low AND high; > > b. Ugh, brain fart. SELECT COUNT(*) AS total, SUM( value BETWEEN low AND high ) AS pass FROM table WHERE text=x; --Bill -

Re: Getting the pass mark

2001-09-05 Thread Benjamin David Hildred
On Wed, Sep 05, 2001 at 08:30:53PM +0100, Chris Thorpe wrote: > Is it possible to modify the following query: > > SELECT COUNT(*) AS pass WHERE test=x AND value BETWEEN low AND high; > > to also count the total number of records where 'test=x' > and hence return the percentage pass mark all with

Re: Getting the pass mark

2001-09-05 Thread Adams, Bill TQO
SELECT SUM( test=x ) AS total, COUNT(*) AS pass FROM table WHERE text=x AND value BETWEEN low AND high; b. Chris Thorpe wrote: > Is it possible to modify the following query: > > SELECT COUNT(*) AS pass WHERE test=x AND value BETWEEN low AND high; > > to also count the total number of records

Getting the pass mark

2001-09-05 Thread Chris Thorpe
Is it possible to modify the following query: SELECT COUNT(*) AS pass WHERE test=x AND value BETWEEN low AND high; to also count the total number of records where 'test=x' and hence return the percentage pass mark all within one statement, or am I stuck using 2 statements 1 as above to count the