I have a table with the following columns: 
account, validity\_date,validity\_month,amount.
For each row i want to check if the value in field "amount' exist over the rows range of the **next month**. if yes, indicator=1, else 0.

```
account   validity_date   validity_month   amount    **required_column**
-------   -------------   ---------------  -------   ----------------
123        15oct2019       201910           400         0
123        20oct2019       201910           500         1
123        15nov2019       201911           1000        0
123        20nov2019       201911           500         0
123        20nov2019       201911           2000        1
123        15dec2019       201912           400         
123        15dec2019       201912           2000        

```

Can anyone help?
Thanks