Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 08 Jan 2002 @ 15:19:57 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Ranking within dimensions
 
From:   Claybourne L. Barrineau

Looks strange, but this should work...(note, no aggregate functions used with OLAP functions. If you need to aggregate, it can be done with a derived table.)

Select    Prod
,    Area
,    Volume Sold
,    Rank(Volume Sold)
From FactTable
Group By  1,2
Qualify   Rank(Volume Sold)   <=   3
Order By  1,2,3

Let me know.

Clay Barrineau
The Coca-Cola Company



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023