We present a pragmatic extension of a Semantic Web query language (including so-called grounded conjunctive queries) with a termination safe functional expression language. This addresses problems encountered in daily usage of Semantic Web query languages for which currently no standardized solutions exist, e.g., how to define aggregation operators and used-defined filter predicates. We claim that the solution is very flexible, since users can define and execute ad hoc extensions efficiently and safely on the Semantic Web reasoning server without having to devise and compile specialized “built-ins” and “plugins” in advance. We also address the scalability aspect by showing how aggregation operators can be realized efficiently in this framework.