Re: [GENERAL] Group By and wildcards...

2005-02-20 Thread Sim Zacks
Even if the function did a select from d, it could still have plenty of duplicates. To remove that possibility you would have to use the distinct clause which is also generally less efficient then a group by. "Bruno Wolff III" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, F

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Oisin Glynn
quot; <[EMAIL PROTECTED]>; Sent: Saturday, February 19, 2005 13:36 Subject: Re: [GENERAL] Group By and wildcards... > On Sat, Feb 19, 2005 at 15:59:52 -0200, > Jon Lapham <[EMAIL PROTECTED]> wrote: > > > > Since I do not want to have to re-write all my aggregate fun

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Greg Stark
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Sat, Feb 19, 2005 at 12:07:12 -0200, > Jon Lapham <[EMAIL PROTECTED]> wrote: > > > > SELECT a.*, b.*, c.*, SUM(d.blah) > > FROM a, b, c, d > > WHERE > > GROUP BY a.*, b.*, c.* > > > > Instead of having to expand the "GROUP BY a.*, b.*, c.*" usi

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Bruno Wolff III
On Sat, Feb 19, 2005 at 14:02:34 -0500, Oisin Glynn <[EMAIL PROTECTED]> wrote: > > But the where clause defines the result of the aggregate function (in this > case the SUM)? Not really. > Is the only reason for needing the GROUP BY CLAUSE is because the aggregate > function demands it? Note

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Russ Brown
Jon Lapham wrote: Ugh. Since I do not want to have to re-write all my aggregate function containing queries upon modifications to the table definitions (and I do not want to write multi-thousand character long SELECT statements), maybe it is easier to use a temp table intermediary? Ugly... ugl

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Bruno Wolff III
On Sat, Feb 19, 2005 at 15:59:52 -0200, Jon Lapham <[EMAIL PROTECTED]> wrote: > > Since I do not want to have to re-write all my aggregate function > containing queries upon modifications to the table definitions (and I do > not want to write multi-thousand character long SELECT statements),

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Jon Lapham
Tom Lane wrote: Bruno Wolff III <[EMAIL PROTECTED]> writes: Jon Lapham <[EMAIL PROTECTED]> wrote: When using queries with aggregate functions, is there any way to not have to have to explicitly write all the columns names after the GROUP BY ? I would like to use a wildcard "*". Don't those tab

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Bruno Wolff III
On Sat, Feb 19, 2005 at 12:40:40 -0500, Tom Lane <[EMAIL PROTECTED]> wrote: > Bruno Wolff III <[EMAIL PROTECTED]> writes: > > Jon Lapham <[EMAIL PROTECTED]> wrote: > >> When using queries with aggregate functions, is there any way to not > >> have to have to explicitly write all the columns na

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > Jon Lapham <[EMAIL PROTECTED]> wrote: >> When using queries with aggregate functions, is there any way to not >> have to have to explicitly write all the columns names after the GROUP >> BY ? I would like to use a wildcard "*". > Don't those table

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Bruno Wolff III
On Sat, Feb 19, 2005 at 12:07:12 -0200, Jon Lapham <[EMAIL PROTECTED]> wrote: > When using queries with aggregate functions, is there any way to not > have to have to explicitly write all the columns names after the GROUP > BY ? I would like to use a wildcard "*". > > Imagine tables a, b, c,

[GENERAL] Group By and wildcards...

2005-02-19 Thread Jon Lapham
When using queries with aggregate functions, is there any way to not have to have to explicitly write all the columns names after the GROUP BY ? I would like to use a wildcard "*". Imagine tables a, b, c, d each with hundreds of columns. As an example, I would like to write: SELECT a.*, b.*, c.