RE: [PHP-DB] Counting Number of Instances in a One2Many Relationships

From: Date: Tue, 24 Jul 2001 14:33:30 +0000
Subject: RE: [PHP-DB] Counting Number of Instances in a One2Many Relationships
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10708@lists.php.net to get a copy of this message
On Monday, July 23, 2001 at 9:54 PM (ahem, set your clock!), Mike Gifford said: > I'd like a simple query to determine how MANY books in a > database are released by A publisher. [...] > The relevant table's here: > > CREATE TABLE WLPbib ( > bibID mediumint(9) NOT NULL, > languageID varchar(5), > publisherID mediumint(9), > categoryID smallint(6), > type varchar(55), > title varchar(255), > pageNumber varchar(55), > source_bibID varchar(55), > publicationDate varchar(5), > dateAdded date, > publishedLanguage varchar(5), > URL varchar(100), > status varchar(5), > PRIMARY KEY (bibID) > ); > > Suggestions are appreciated! SELECT publisherID,count(*) FROM WLPbib GROUP BY publisherID; - Brian ----------------------------------- Brian S. Dunworth Sr. Software Development Engineer Oracle Database Administrator The Printing House, Ltd. (850) 875-1500 x225 -----------------------------------

« previous php.db (#10708) next »