Subject | Re: [ib-support] Re: Newbie question IB about select |
---|---|
Author | Woody |
Post date | 2002-08-29T14:35:50Z |
> Hi Woody,Is not the definition of an aggregate column one whose value is computed?
>
> >
> > Select MaterialType, MaterialSize1, MaterialSize2, sum(MaterialWgt),
> > sum(MaterialWgt * MaterialCost) from Materials
> > Group by MaterialType, MaterialSize1, MaterialSize2
> >
> > In what way would you change the query not to use non-aggregate columns?
> > Woody (TMW)
>
> What are you getting at? All of your resulting columns are aggregated ...
The above doesn't compute the material type or size, only the combined
weight and cost. In IB (and FB I believe) the SQL rules state that to use
Group By in an aggregate query, you must include all non-aggregate columns,
right?
>Sure, blame someone else... <VBG>
> It's not me who made the SQL rules, you know :)
>
Woody (TMW)
----------------------
"To invent, you need a good imagination and a pile of junk."
Thomas Edison