The below function compiles with no issues.
function RandomFunctionName (p_id varchar2) RETURN NUMBER IS BalanceValue NUMBER; BEGIN SELECT SUM(T