--- Kurt Welgehausen <[EMAIL PROTECTED]> wrote:
> > select a from qqq group by b;
> 
> This question was discussed on the list a year or 2 ago.
> 
> The column a in the simple query above is meaningless; it's
> an arbitrary value from each group.  There are queries,
> however, where a non-grouped column is meaningful, such as
> a join where the grouping column is a foreign key that
> references the primary key of another table.

Although I don't follow your example, I suppose that if
someone wanted to select a not-so-random arbitrary member of a 
group then this GROUP BY extension would do the trick.

But I would favor an explicit approach that disallows this 
non-standard GROUP BY extension, and instead adds a new 
non-standard, easily understood aggregate function, such as:

  select arbitrary(a) from qqq group by b;

that would give comparable functionality yet still provide the 
traditional error checking one would expect with GROUP BY 
SELECT statements.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to