Search Postgresql Archives

Re: histogram

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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:


try something like this:

    trunc(random() * 10.)/10.
    , count(*)
group by 1 order by 2
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+--------------------------------------- | @wagerlabs |

Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:

[Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Programming PHP]     [Kernel Newbies]     [PHP Classes]     [Find Someone Nice]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

Add to Google Powered by Linux