You cannot use STRING_AGG in Mendix OQL.Although the documentation lists it, the OQL engine in View Entities does not implement this function, which is why you get:
Unknown function 'string_agg'
Mendix OQL currently does not support any string aggregation functions (STRING_AGG, LISTAGG, GROUP_CONCAT).
✔ Workarounds
Microflow aggregationRun your OQL / view entity query normally, loop through the result list, and build your comma-separated string manually:
$result + ',' + $item/Nummer
Database View (recommended if using SQL Server/PostgreSQL)Create a DB view using native SQL:
STRING_AGG(Nummer, ',')
Then expose that view in Mendix as an External Entity.
✔ Summary
There is no direct OQL solution for string aggregation in Mendix View Entities; use a microflow or a database view