Count the children

Поиск
Список
Период
Сортировка
От Michael Rowan
Тема Count the children
Дата
Msg-id 4BB75B17-3932-4B44-8D82-CF7C07CDFE09@internode.on.net
обсуждение исходный текст
Ответы Re: Count the children  (Sean Davis <sdavis2@mail.nih.gov>)
Re: Count the children  (Mark Styles <postgres@lambic.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Michael Gould
Дата:
Сообщение: Platform for running Postgres 8.4
Следующее
От: Sean Davis
Дата:
Сообщение: Re: Count the children