Subject | Re: [firebird-support] Aggregate functions |
---|---|
Author | Helen Borrie |
Post date | 2004-06-05T09:38:42Z |
At 09:30 AM 5/06/2004 +0000, you wrote:
You missed out the Group By?
select sum(a) as total, b
from MYTABLE
where b starting with 'whatever'
group by b
having sum(a) > 0
/heLen
>Hi,No, no way.
>
>I want to do something like
>
>select sum(a) as total, b
>from MYTABLE
>where b like 'whatever%'
>having total > 0
>
>But it moans at me using the labels. I know it works without the
>labels, as in this works:
>
>select sum(a) as total, b
>from MYTABLE
>where b like 'whatever%'
>having sum(a) > 0
>
>
>is there anyway of getting it to work with labels?
You missed out the Group By?
select sum(a) as total, b
from MYTABLE
where b starting with 'whatever'
group by b
having sum(a) > 0
/heLen