Dima says:

> Another SQL processor allows this. I have just made the query in Access:
>
> SELECT Count(sub_category_subscriber.sub_category_id)
> AS CountOfsub_category_id
> FROM sub_category_subscriber
> GROUP BY sub_category_subscriber.subscriber_id;
>
> As you see, records are grouped by subscriber_id, but it does not
> present in the list of selected columns.
>
> This is another question if such SQL makes sense, but it is allowed.

And Daniel says:

> I just tried this in Microsoft Visual FoxPro ver. 6
>
> select sum(hw_dist), lastname, firstname from peopletable into cursor
> cc order by id group by zipcd
>
> It worked just fine.  The table is a native DBF file, but it would do
> the same thing with a local view of an SQL table.

To which our engineer responds:

I misspoke on this one.  You can GROUP BY columns not in the projection
list.  What you can't do now is this:  when you have both a GROUP BY and
an ORDER BY, you cannot ORDER BY things not in the projection list.
I know Access and Oracle don't allow this; I doubt that FoxPro does,
either.

----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to