2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Get first value from data

Hi i have data related to history of transactions. In that i want to get first amount based on some calculations and order by some columns for all accounts.

Please help anyone.

Thanks in advance.

userimage

You can use “FIRST_VALUE”.

It is used to find the first value from a ordered set of values.

Syntax :-

1) FIRST_VALUE(column) over(partition by column order by column )

2) FIRST_VALUE(column) ignore nulls over(partition by column order by column )

— Above will ignore null column’s

Answer is