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 -> Meta Data table??

Meta Data table??

From: Z. Martinez <zlm101_at_psu.edu>
Date: 1996/12/20
Message-ID: <32ba0434.3957843@news>#1/1

I'm trying to generate a summarized table from an existing table.

The scenario goes something like this . . .

I have a table, called SALES_TRANSACTIONS, with 5 columns.

transaction number
date (year)
product ID
store number
store region
sale amount

I need to accomplish the following:

  1. extract the top 100 products, based on sale amount, by store number. The resulting table should have 4 columns, i.e store, product_rank_in_store, product_ID, sales_total.
  2. extract the top 20 stores, based on sales amount, by year and by region. The resulting table should have 5 columns, i.e. year, region, store_rank_in_year_in_region, store, store_sales.

I'm looking for a PL/SQL solution but a SQL solution would be great.

Thank you any information.

Please your response to zlm101_at_psu.edu Received on Fri Dec 20 1996 - 00:00:00 CST

Original text of this message

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