I thought you must be mistaken, but surprisingly, when I tried it in MariaDB/MySQL it works! However, it seems to pick arbitrary values which is not what you ought to rely on in any case so I think DB2 failing is the correct thing to do.
The problem is this, if you have a table as follows:
...and you do
select ID, MAX_MEM from TABLE group by ID
How should SQL know which value from MAX_MEM should be included in the summarised row?
As I said above, it seems MySQL is indeterminate, which is never a good thing, so you need to either select min(MAX_MEM), max(MAX_MEM) or use some other aggregating function to aggregate/select the value. If there's some other column that dictates which MAX_MEM value has priority then you can use the OLAP functions to order and pick the value you need.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.