A SELECT statement in a function argument

As another example, suppose you create the following type hierarchy and functions:
CREATE ROW TYPE emp_t    
    (name VARCHAR(30), emp_num INT, salary DECIMAL(10,2));
CREATE ROW TYPE trainee_t (mentor VARCHAR(30)) UNDER emp_t;
CREATE TABLE trainee OF TYPE trainee_t;
INSERT INTO  trainee VALUES ('sam', 1234, 44.90, 'joe');

CREATE FUNCTION func1 (arg1 trainee_t) RETURNING row;
DEFINE newrow trainee_t;
LET newrow = ROW( 'sam', 1234, 44.90, 'juliette');
RETURN newrow;
END FUNCTION;
The following EXECUTE FUNCTION statement invokes the func1() function, which has an argument that is a query that returns a row type:
EXECUTE FUNCTION 
   func1 ((SELECT * from trainee where emp_num = 1234)) ...
Important: When you use a query for the argument of a user-defined function invoked with the EXECUTE FUNCTION statement, you must enclose the query in an additional set of parentheses.