Re: Retreving count of rows returned by a join query

From: "Jasbinder Singh Bali" <jsbali(at)gmail(dot)com>
To: "Phillip Smith" <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au>
Cc: "Novice Postgresql-list" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Retreving count of rows returned by a join query
Date: 2007-05-31 09:17:45
Message-ID: a47902760705310217x295ba823n70135a52744a08f9@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

with count(*) i want other rows as well
something like

select count(*) , a.3 from a, b where a.3 = b.3;

On 5/31/07, Phillip Smith <phillip(dot)smith(at)weatherbeeta(dot)com(dot)au> wrote:
>
> Works for me:
>
>
>
> select count(*) from a, b where a.3 = b.3;
>
>
>
> -----Original Message-----
> *From:* pgsql-novice-owner(at)postgresql(dot)org [mailto:
> pgsql-novice-owner(at)postgresql(dot)org] *On Behalf Of *Jasbinder Singh Bali
> *Sent:* Thursday, 31 May 2007 18:32
> *To:* Novice Postgresql-list
> *Subject:* [NOVICE] Retreving count of rows returned by a join query
>
>
>
> I have a query in which I have joins.
>
> something like
>
> select a.1, b.2 from a, b
> where a.3 = b.3;
>
> how can I fetch the number of rows returned by this query.
> normal count(*) doesn't work in this context as desired.
>
> Thanks,
> ~Jas
>
> ********************Confidentiality and Privilege
> Notice********************
>
> The material contained in this message is privileged and confidential to
> the addressee. If you are not the addressee indicated in this message or
> responsible for delivery of the message to such person, you may not copy or
> deliver this message to anyone, and you should destroy it and kindly notify
> the sender by reply email.
>
> Information in this message that does not relate to the official business
> of Weatherbeeta must be treated as neither given nor endorsed by
> Weatherbeeta. Weatherbeeta, its employees, contractors or associates shall
> not be liable for direct, indirect or consequential loss arising from
> transmission of this message or any attachments
>
>

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Phillip Smith 2007-05-31 09:33:39 Re: Retreving count of rows returned by a join query
Previous Message Phillip Smith 2007-05-31 09:05:30 Re: Retreving count of rows returned by a join query