oracle11g – What is the use of oracle first_Value analytical function?

oracle11g – What is the use of oracle first_Value analytical function?

So,I am not understanding what is the use of first_value() in the first query?

Well, its simply listing the cheapest product on every record in your result set in the column called First Product

Since the data I am getting is same what is the use of this analytical function?

But its different. you have a First product column in your first query. Maybe someones using it for a comparison later on. Maybe its to quickly link to the cheapest product within the result set later…. Cant say WHY someone coded it this way; but I can come up with a few guesses.

Note that Intel Core i7-5930K is the cheapest product in the result set; and thus gets listed on every other record in the result set due to the analytical function use.

oracle11g – What is the use of oracle first_Value analytical function?

Related posts

Leave a Reply

Your email address will not be published.