Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 31 May 2010 @ 10:45:29 GMT

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

From:   Dmitriy.Boyko

Hi all.

Assume we have two data sets:

     First:   Second:
     X        Y
     1        2
     1        2

Rank function will return 2 (value) for both data sets because the values placed both in X and Y are equal. Thus

     Select x, rank() over(order by x) r from First

Will return:

     X, r
     1, 2
     1, 2

For Second - the same situation.

So, how do you think what join with condition First.r = Second.r will return? It will return 4!!! Rows!

And now the question to Syed:

How many rows should return the query due to your business logic?

Best regards,

Dmitriy Boyko

  <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