Get the total as a percentage of two grouped results

2004-04-08 Thread Terence
Hi List, Can this be done in one sql statment (without the use of sub-queries): SELECT count(*) as total, status FROM table GROUP BY status --- Absent | 40 Present|60 and get this result: Absent: 40% something like: SELECT ((count(total) OF status=Absent) /

Re: Get the total as a percentage of two grouped results

2004-04-08 Thread Egor Egorov
Terence [EMAIL PROTECTED] wrote: Can this be done in one sql statment (without the use of sub-queries): Without subqueries - no. SELECT count(*) as total, status FROM table GROUP BY status --- Absent | 40 Present|60 and get this result: Absent: