Count the children - Mailing list pgsql-novice

From Michael Rowan
Subject Count the children
Date
Msg-id 4BB75B17-3932-4B44-8D82-CF7C07CDFE09@internode.on.net
Whole thread Raw
Responses Re: Count the children  (Sean Davis <sdavis2@mail.nih.gov>)
Re: Count the children  (Mark Styles <postgres@lambic.co.uk>)
List pgsql-novice
I need what sounds like a very simple query - but I'm darned if I can
figure it out.

I have two tables, parent and child related by child.parent_id =
parent.id
The query should return, for each parent row, parent.name and number
of child rows

Can someone enlighten me, please?

Michael Rowan
mike.rowan@internode.on.net

11 Kingscote Street
ALBERTON
South Australia 5014

tel 618 8240 3993




pgsql-novice by date:

Previous
From: Michael Gould
Date:
Subject: Platform for running Postgres 8.4
Next
From: Sean Davis
Date:
Subject: Re: Count the children