結果 : how to use select statement in sql function