From: kaf@ip146.usw5.rb1.bel.nwlink.com
To: pgsql-sql@postgresql.org
Subject: simple sql select help
Date: 17 Dec 1999 10:03:56 -0800
Message-ID: <83dtuc$1nh$1@ip146.usw5.rb1.bel.nwlink.com> (raw)
I'm fairly new to sql & postgres. I need some help with this query on
a database I'm constructing. I've got two tables, publishers & books,
which have the following columns (some columns removed for simplicity):
publishers:
name (primary key), address, ...
books:
title, publisher, ...
Given the above I'd like to query the database to see how many books
each publisher has.
The publisher column of the books table should be declared a foreign
key to publishers.name, though I haven't put the appropriate triggers
in yet. Like I said, I've not much database experience. Humor me
here, how do I find the number of books each publisher has?
Thanks,
Kyle
kaf@_nwlink_._com_
remove underscores to reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: kaf@ip146.usw5.rb1.bel.nwlink.com
Subject: Re: simple sql select help
In-Reply-To: <83dtuc$1nh$1@ip146.usw5.rb1.bel.nwlink.com>
References: <83dtuc$1nh$1@ip146.usw5.rb1.bel.nwlink.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox