Re: SQL Question - Group By and % results per row

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mike <akiany(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQL Question - Group By and % results per row
Date: 2007-03-15 20:56:18
Message-ID: 20070315205618.GB2156@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 12, 2007 at 12:53:11 -0700,
Mike <akiany(at)gmail(dot)com> wrote:
>
> How do I get access to the total of all clicks on per row basis so I
> can divide it? The only solution that comes to my mind is create a
> subquery that does a (select count(*) from... where... ) of the
> original grouped by sql statement.

That's how you do it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Florian G. Pflug 2007-03-15 21:11:28 Re: Native type for storing fractions (e.g 1/3)?
Previous Message Jonah H. Harris 2007-03-15 20:47:46 Re: [SQL] PostgreSQL to Oracle