Subject | Re: Stupid Programmer or a bug? |
---|---|
Author | rogervellacott |
Post date | 2007-06-10T15:27:36Z |
You must group by all the non-aggregating fields, not the aggregating
ones.
select zone, description, count(description) as calls, sum(duration)
from report
group by zone,description
Roger Vellacott
Passfield Data Systems Ltd
--- In firebird-support@yahoogroups.com, "Dalton Calford"
<dcalford@...> wrote:
ones.
select zone, description, count(description) as calls, sum(duration)
from report
group by zone,description
Roger Vellacott
Passfield Data Systems Ltd
--- In firebird-support@yahoogroups.com, "Dalton Calford"
<dcalford@...> wrote:
>group by,
> Ok, I have to admit it has been a very long time since I used
> so I am admitting that this may be my fault from the startbut.......
>(duration)
> I have a table (report), with four columns
>
> Zone integer
> Description varchar(50)
> StartTime timestamp
> Duration integer
>
>
> So I use IB_SQL to create a simple query
>
> select zone, description, count(description) as calls, sum
> from report group by calls order by descriptionnothing.
>
> I try to prepare the query, but instead of an error, I get
> IB_SQL looks to be waiting for the server to return but theserver's CPU
> is sitting at 0%.have
>
> Please someone, tell me that I am just having an off day and that I
> not found a bug in the group by code in Firebird 1.53more
> (and If it is me, what the %&$^ am I doing wrong - I think I need
> coffee)
>
> Best regards
>
> Dalton
>