List:General Discussion« Previous MessageNext Message »
From:Ananda Kumar Date:July 25 2008 2:36pm
Subject:Re: How do I (can I) use aggregate functions inside a select
View as plain text  
yes, u can use the below sql.

regards
anandkl


On 7/25/08, David Ruggles <david@stripped> 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
>
>
> Thanks,
>
> David Ruggles
> CCNA MCSE (NT) CNA A+
> Network Engineer        Safe Data, Inc.
> (910) 285-7200  david@stripped
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

Thread
How do I (can I) use aggregate functions inside a selectDavid Ruggles25 Jul
  • Re: How do I (can I) use aggregate functions inside a selectAnanda Kumar25 Jul
    • RE: How do I (can I) use aggregate functions inside a selectDavid Ruggles25 Jul
      • RE: How do I (can I) use aggregate functions inside a selectIan Simpson25 Jul
      • RE: How do I (can I) use aggregate functions inside a selectJerry Schwartz25 Jul
  • Re: How do I (can I) use aggregate functions inside a selectwalter harms25 Jul