Is there any way to return multiple values from a function? Ideally looking to do something along these lines (I know that syntax is wrong!)
SELECT
1 as test1, 2 as test2, 3 as test3,
fn_result(test1, test2, test3)[0] as result1,
fn_result(test1, test2, test3)[1] as result2,
fn_result(test1, test2, test3)[2] as result3
FUNCTION fn_result(val1, val2, val3)
RETURN (val1 + val2, val2 + val3, val1 + val3)
I have no experience at all with SQL functions so not sure if such a thing can be done.
Thanks