"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
-
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
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