Guest User

Untitled

a guest
Jan 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. Fruit Date Price Flag Price first Price Last
  2. Apple 6/1/2015 1.4 Yes 1.4 1.9
  3. Apple 6/2/2015 1.5 Yes 1.4 1.9
  4. Apple 6/3/2015 2.5 Yes 1.4 1.9
  5. Apple 6/4/2015 3 Yes 1.4 1.9
  6. Apple 6/5/2015 1.7 Yes 1.4 1.9
  7. Apple 6/6/2015 1.9 No 1.4 1.9
  8.  
  9. Fruit Date Price Flag Price first Price Last Price Last Flag Yes
  10. Apple 6/1/2015 1.4 Yes 1.4 1.9 1.7
  11. Apple 6/2/2015 1.5 Yes 1.4 1.9 1.7
  12. Apple 6/3/2015 2.5 Yes 1.4 1.9 1.7
  13. Apple 6/4/2015 3 Yes 1.4 1.9 1.7
  14. Apple 6/5/2015 1.7 Yes 1.4 1.9 1.7
  15. Apple 6/6/2015 1.9 No 1.4 1.9 1.7
  16.  
  17. last_value(case when Flag = 'Yes' then Price end ignore nulls)
  18. over (partition by Fruit order by Date ...
Add Comment
Please, Sign In to add comment