TOP TEN? Try Red Brick

From: NRaden <nraden_at_aol.com>
Date: 23 Dec 1994 20:49:57 -0500
Message-ID: <3dfuo5$ar3_at_newsbf02.news.aol.com>


Red Brick's extended SQL includes many features that allow SQL to generate results not possible in other RDB's. Here is one example:

What were the top ten ranked months for sales dollars of Widgets during 1993?
What were the corresponding ranks by units?

select        city, month, dollars,
                 rank(dollars) as sales_rank,
                 rank(units) as units_rank
from           sales, market, product, period
where         year = 1993
   and         product like 'Widge%'
when          rank(dollars) <= 10
order by      city ;  

Results in:

city              month       dollars    sales_rank     units_rank
---------------    ---------       ---------     ---------------      
-------------
Chicago       DEC          1141.44         1                   6
Chicago       NOV          1140.21         2                   7
Los Angeles OCT          1138.98         3                   8

...etc.

Those of you who can figure out how to do this type of query are to be commended for your ingenuity, but why not just use a better tool?

Neil Raden
Decision Support/Data Warehouse Consulting

Envirometrics, Inc.                            805.564.8672
133 E. De La Guerra St.                    805.962.3895 (fax)
Santa Barbara, California 93101         E-Mail:  NRaden_at_aol.com
Received on Sat Dec 24 1994 - 02:49:57 CET

Original text of this message