× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Basically, grouping is done after record selection. The result set after
selection needs to have the group by fields in it, hence they need to be in
the select list.

It's not clear what you want to do. You can't just have fld2 and fld3
either. If you group by fld1, there have to be aggregate functions
performed on the other 2 fields, like max(fld2) or avg(fld3). The result
is, say, the maximum of the values for fld2 for each unique value of fld1.

AFAIK, this is standard behavior for all flavors of SQL.

At 10:49 AM 6/6/02 -0700, you wrote:
>I'm running version 4.5, and I was wondering if all versions of SQL require
>this...
>
>if I have a table,
>
>Timstable
>------------------
>fld1
>fld2
>fld3
>
>and I want to group this table, but I only need fld2 and fld3, but I want to
>group by fld1,  why do I have to put fld1 in the select portion, isn't group
>by enough?
>
>Thanks, tim


Vern Hamberg

Would you like to see a challenging little arithmetic puzzle
that might get you or your kids or grandkids more interested
in math? Go to <http://cgi.wff-n-proof.com/MSQ-Ind/I-1E.htm>

Sillygism--

Something is better than nothing.
Nothing is better than a ham sandwich.
Ergo
Something is better than a ham sandwich.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.