Skip to content
Advertisement

oracle sql Sort dated transactions by order of transaction

I have been working on this for a few weeks and I know there’s a way like using ROW_NUMBER(), but I’m just not too familiar with it, Or maybe there’s a better way….


shows this:

It needs to show this:

As you can see, there’s 2 delete dates for SKU 555454, and it has to show the lasted manual delete date of that SKU before a ship date of the same SKU.

Advertisement

Answer

Looks like you need something like this:

Full example with test data:

Result:

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement