David Ruggles wrote:
> I may be approaching this all wrong, but I need to know a percentage of
> total sales within a select statement.
>
> So I can do something like this:
> Select company, state, sales, sum(sales) / sales as percent
> From Sales
>
>
mmh, you want
sum(sales where company="foo")/sum(sales)
you can do this only when doing 2 queries and storing al least one result
re,
wh
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]