MySQL & MariaDB error 4074 ER_VALUE_OUT_OF_RANGE
Same number, two different errors. 4074 means one thing in MySQL and another in MariaDB. Check which server you are connected to.
MySQL…=… is outside the valid range […,…]. … will be used.
MariaDBWindow functions can not be used as arguments to group functions.