Archives of the TeradataForum
Message Posted: Tue, 08 Jan 2002 @ 14:34:40 GMT
Currently, the only ranking mechanisms I am aware of are those using the RANK or CSUM functions. With these, I am able to answer questions such as; "What were the top 10 selling products yesterday?", and I get an answer set like this:
1 ProdA 2 ProdG 3 ProdM etc. 10 ProdD
I now need to answer a question along the lines of; "What were the top 3 selling products by area yesterday?". I would like to get an answer set something like:
1 ProdA Area1 2 ProdG Area1 3 ProdW Area1
1 ProdG Area2 2 ProdA Area2 3 ProdW Area2 etc.
i.e. I need to break on Area Number. Short of running the same SQL for each Area I can't see how to do this. Any ideas?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|