SET NAMESPACE 'http://teiid.org/rest' AS REST;
CREATE VIRTUAL PROCEDURE g1Table() RETURNS TABLE (xml_out xml) OPTIONS ('REST:METHOD' 'GET', 'REST:URI' 'g1')
AS
BEGIN
SELECT XMLELEMENT(NAME "all", XMLAGG(XMLELEMENT(NAME "row", XMLFOREST(e1, e2)))) AS xml_out FROM Txns.G1;
END