Subject RE: [firebird-support] Re: Firebird 2.0 Indexing
Author Svend Meyland Nicolaisen
>
> Alan McDonald wrote:
>
> > you said above that store_no is a PK - how can you deliver
> DISTINCT pk
> > values unless it is just select pkfield from table?
>
> No, he said that (SKU, STORE_NO) constitutes a PK. The GROUP
> BY 1 is obviously a typo, probably because he was
> experimenting with variations of the query to see what the
> results would be. He meant GROUP BY STORE_NO.
>

Isn't "GROUP BY 1" exactly the same as "GROUP BY store_no" in the query
"SELECT store_no FROM mytable GROUP BY 1" because "1" refers to field number
1 in the select field list just as one can say "ORDER BY 1" instead of
"ORDER BY store_no"?

/Svend