Re: Help please: getting the total from the results of SUM

2001-02-15 Thread jerome auza
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

Total = the total of the SUM function

2001-02-12 Thread jerome auza
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,