Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Help!!! Complex SQL (For Pros Only)

Help!!! Complex SQL (For Pros Only)

From: <bonanos_at_yahoo.com>
Date: Mon, 21 Jun 1999 09:37:13 GMT
Message-ID: <7kl149$60o$1@nnrp1.deja.com>


Hi

I have three tables.

  1. [HEADER] is the master table
    id_code -- Unique identifier cat_code -- Category code that this header falls under descr -- Header text
  2. [CONTENT] is a detail table (many to [HEADER])
    id -- Unique identifier title -- title of the document cdate -- Date document was added Author -- Author of the document cfile -- The name of the file ftype -- The type of file (html, audio,jpeg etc) Header_Code -- link to id_code in [Header table] cat_code -- Category this document is in.
  3. [LINKS] is a detail table (many to [HEADER])
    id -- Unique identifier cat -- Category this document is in. l_name -- the text of the links l_url -- the actual http:// address Summary -- a description Header_Code -- link to id_code in [Header table]

What I want to produce is the following query result

Header_code Description content_count link_count


123            Agriculture Policy      12               3
236            Agriculture Projects    3                3
123            Agriculture Budgets     5                0



You get the piicture, let me express it verbally.

I want all the Headers in a category with a count of documents and link for each header.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jun 21 1999 - 04:37:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US