[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting the pass mark


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 passes and a second :

SELECT COUNT(*) AS total WHERE test=x;

to count the total??????

Chris Thorpe
Consultronics Europe Ltd



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread84641@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-treed=ultraviolet.org@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



This mailing list archive is a service of Copilot Consulting.