| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Yaroslav Saburov <y(dot)saburov(at)gmail(dot)com>, PostgreSQL Documentation <pgsql-docs(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: wrong field in example |
| Date: | 2024-07-24 16:04:40 |
| Message-ID: | CAKFQuwb=tMmBMFY=3VyC2sYMEd=wFYa3YF+Riq7r-Pa6Hrppog@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
Just noticed you replied to me only. Send replies to the list. You can
leave individuals cc'd. The convention here is also to inline your replies
- top-posting is undesirable.
In any case, in order to write "select *" you have to group on both x and y
at the same time. If you group on either column only, the query will
fail. So the choice of x versus y is immaterial. Having grouped on x the
text is explaining that the failure to also group on y is a problem.
I don't know that the existing wording is the most clear, but it is correct.
David J.
On Wed, Jul 24, 2024 at 8:02 AM Yaroslav Saburov <y(dot)saburov(at)gmail(dot)com>
wrote:
> >>because there is no single value for the column y that could be
> associated with each group.
>
> 24 лип. 2024 р. о 17:51 David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
> пише:
>
>
>
>
> On Wed, Jul 24, 2024, 07:45 Yaroslav Saburov <y(dot)saburov(at)gmail(dot)com> wrote:
>
>> group by y, not by x
>>
>> Why?
>
> David J.
>
>>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2024-07-24 16:17:30 | Re: wrong field in example |
| Previous Message | David G. Johnston | 2024-07-24 13:51:57 | Re: wrong field in example |