Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001072

RE: [PHP-DB] Counting Number of Instances in a One2Many Relationships From: Brian Dunworth (brian <email protected>)
Date: 07/24/01

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
 -----------------------------------

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>