joining a query with a select count(*)

Поиск
Список
Период
Сортировка
От Matthew Terenzio
Тема joining a query with a select count(*)
Дата
Msg-id 14c2bdaff408ddf3dec1da51068f48d2@jobsforge.com
обсуждение исходный текст
Ответы Re: joining a query with a select count(*)
Re: joining a query with a select count(*)
Список pgsql-general
I want a query to return all the rows from one table along with a count
of rows in another table that reference each returned row from the
first table.

For instance, if you had a table of children and another table of
grandchildren that had a foreign key on the children table, I'd want to
return all children with a count of the number of kids they had.

I hope I can figure it out before I get a reply.

Thanks


В списке pgsql-general по дате отправления:

Предыдущее
От: "Florian G. Pflug"
Дата:
Сообщение: Missing variable "role" in "pg_settings"?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: joining a query with a select count(*)