Hmm… my hunch is that this doesn’t do what you think it does.
I expect the order by in the window function is effectively lost because max operated over the whole window. (And you happen to get the most recent, because in many implementations, order_id will be a sequence.)
But I might be wrong. And I might only now be learning that order by with max() and over substitutes how the “value” of the order_id is understood.
Here's a pretty simple/normalish way to handle the edge cases. This one (without distinct) is far more consistent (wall-clock-wise, doesn't depend on caches): http://sqlfiddle.com/#!15/7eb3a/9
Note that order 2 is after order 4 in the example schema.
Depends on the industry,Oracle Netsuite is similar to SAP. A lot of construction/professional
services use Deltek Vantagepoint. Also Mircosoft Dynamics comes to mind.
Yeah, it really depends on the exact use case. And the availability of functional consultants with relevant industry expertise. SAP isn't great t project management, even if make-to-order works just fine, but that is still a manufacturing environment. SAP is also somewhat lacking in terms of logistics and warehousing (at least it was last time I checked / worked with SAP in that field 5 or so years ago).
MS Dynamics seems to have some good ideas when it comes to field services (I never worked with that, so). INFOR is rather good when it comes to project management and project driven manufacturing and planning. So, pick your poison, because no system will satisfy all you wishes, but the decent ones will satisfy almost all your needs, one way or another.
One of the big benefits of picking SAP is the huge pool of people with relevant experience, from developers over users (from simple employees over key users to super key users) all the way to those "controversial" consultants. And that across almost all industries, countries, regions and functions.
Project Hail Marry by Andy Weir
Dungeon Crawler Carl (Books 1-7) by Matt Dinniman
I'm currently reading:
Careless People: A Cautionary Tale of Power, Greed, and Lost Idealism by Sarah Wynn-Williams
reply