Hi, I am not sure whether the title clearly explains my question. Here's the data I have
The data shows the price change and quantity change for an item (with item_id 331314221355) over time. I only care price change, my goal is to find the last date of each price over time. The result should look like this:
The difficult part is the first and third price are the same. If I aggregate only by item_id and price, I will only obtain two rows like
I am considering whether I can add some chronological identifier to solve this problem. Could anyone give any suggestions?
Thanks a lot!
Solved! Go to Solution.