?I have the following query:
    SELECT
        (SELECT COUNT(*) FROM proverbs)                        AS Total
    ,   (SELECT COUNT(*) FROM proverbs WHERE NOT used IS NULL) AS Used

But I want something like:
?    SELECT
        (SELECT COUNT(*) FROM proverbs)                        AS Total
    ,   (SELECT COUNT(*) FROM proverbs WHERE NOT used IS NULL) AS Used
    ,   (Total - Used)                                         AS Free
??
?But then I get:
?    no such column: Total

It can be done, because I have it done in the past, but obviously a little
different. :'-(

?Anybody knows how it can be done??

-- 
Cecil Westerhof

Reply via email to