From: | Thomas Markus <t(dot)markus(at)proventis(dot)net> |
---|---|
To: | Joel Reymont <joelr1(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: histogram |
Date: | 2011-05-01 07:41:43 |
Message-ID: | 4DBD0EB7.8070207@proventis.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
hi,
group by 1 means group by first output column
order by 2 means order by second output column ascending
Am 30.04.2011 19:00, schrieb Joel Reymont:
> What is the meaning of
>
> group by 1 order by 2
>
> e.g. what to the numbers 1 and 2 stand for?
>
> What would change if I do the following?
>
> group by 1 order by 1
>
> On Apr 30, 2011, at 5:48 PM, Thomas Markus wrote:
>
>> Hi,
>>
>> try something like this:
>>
>> select
>> trunc(random() * 10.)/10.
>> , count(*)
>> from
>> generate_series(1,2000000)
>> group by 1 order by 2
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2011-05-01 08:20:14 | Re: Postgresql, PSN hack and table limits |
Previous Message | Sim Zacks | 2011-05-01 07:02:47 | Re: "OLD." || myColumnNameVar (How to generically access columns in a trigger's OLD or NEW records) |