Subject | RE: [firebird-support] Re: group by or distinct |
---|---|
Author | Alan McDonald |
Post date | 2004-09-02T09:05:27Z |
> > > hello,There's no point in grouping by a set of fields unless you are aggregating
> > >
> > > what is faster in such case:
> > >
> > > select
> > > field1, field2, field3
> > > from
> > > table1
> > > group by
> > > field1, field2, field3;
> > >
> > > or
> > >
> > > select distinct
> > > field1, field2, field3
> > > from
> > > table1;
> > >
> > > CUIN Kaczy
> >
> > different results for each - which one do you want?
> different?? what do I miss? what is the difference?
>
> > Alan
> CUIN Kaczy
an additional field.
select
field1, field2, field3, sum(field4)
from
table1
group by
field1, field2, field3;
what do you want the goup by to return in terms of actual grouping?
Alan