The function row_number() is an analytical function. Virtual DataPort can push down this function to a database, but cannot execute it. If a query uses this function and it cannot be pushed down to a database, the query will fail. So if it can't delegate it, either because the source doesn't support it, or for any other reason, you get that error. For more information please refer to [Row Number](https://community.denodo.com/docs/html/browse/7.0/vdp/vql/appendix/syntax_of_condition_functions/analytic_functions_window_functions#row-number) document.
So basically the problem is that you have written a query that can’t be delegated because it contains the firstdayofmonth but needs to be delegated because it contains row_number(). This is because DB2 doesn’t support firstdayofmonth function, therefore it can only be executed in Virtual DataPort and not delegated. It could be done if the query was written in such a way where the delegation of row_number() didn’t require the delegation of firstdayofmonth.
Hope this helps!