sql - teradata row_number() over(partition by X , Y order by Z desc) = 1 -


i use in teradata sql assistant:

row_number() over(partition x||y order z desc) = 1 

my colleague uses same difference doesn't enter "||" between 2 attributes, enters ",". tested small data both , not find difference in output.

my assumption using "||" kind of concatenation of 2 attributes (x , y). true or not?

does difference between "||" , "," in command?

many in advance..

the 2 similar. however, version commas is correct (for purposes). consider happens in these cases:

x    y    bc ab   c 

the concatenation version combine them both "abc", don't want that. comma version treats values ('a', 'bc') , ('ab', 'c'), separate -- if did group x, y.

only concatenate values if intention.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -