for percent.
I want can do this calculation in one line. :) Currently I use two SELECT
statements, the first to get the total, then use that value to calculate for
the percent.
jerome
From: "Rus" [EMAIL PROTECTED]
To: "jerome auza" [EMAIL PROTECTED], [EMAIL PROTECTED]
Subj
Hi,
I was wondering if there is a way I can do this in MySQL as a one line
command:
SELECT COUNT(*) as Qty, Name, 100 * Qty/(SELECT COUNT(*) from Table1) as
Percent from Table1 GROUP BY Name;
Currently I have to do this in two lines:
SELECT COUNT(*) from Table1;
SELECT COUNT(*) as Qty,