Subject | Re: [firebird-support] SUM, group by |
---|---|
Author | Robert martin |
Post date | 2004-10-10T21:34:35Z |
You need (at least) to have Field2 and Field3 listed in your group by.
Rob Martin
Software Engineer
phone 03 377 0495
fax 03 377 0496
web www.chreos.com
Wild Software Ltd
Rob Martin
Software Engineer
phone 03 377 0495
fax 03 377 0496
web www.chreos.com
Wild Software Ltd
----- Original Message -----
From: "Planles" <planles@...>
To: "Firebird" <firebird-support@yahoogroups.com>
Sent: Monday, October 11, 2004 10:16 AM
Subject: [firebird-support] SUM, group by
>
> Hello,
>
> I have following select statement, which reports me an error (error
> code -104, invalid expression in the select list):
>
> select Field1,Field2, Field3,
> SUM(Field4) as SField4,
> SUM(Field5) as SField5,
> SUM(Field6) as SField6
> from TABLE
> group by Field1
> order by Field1
>
>
> I want to get a sum of fields 4,5,6 for each of Field1.
>
> What am I missing here ?
>
>
>
> Regards,
> Primoz
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>