You'll need a subquery here, but you want to write this as a select. Find the rows with a null and then join that back and find the previous row.
We are happy to help, but we would like to see you make an attempt at the SQL. We don't want to be doing homework or answering interview questions for you.