Oracle 11g. Try to nest a function in the select statement. Purpose: get the average customer rating for each of the user qualified.
select user_name, f_get_avg_cust_rating() 'Rating'
from TAB_USER u, OTHER_TABLES o
where u.id = o.id and other condition matched;
How would Oracle process the sql. Is it
1) First screen records based on the where clause, then call the f_get_avg_cust_rating() for each of the selected records OR
2) While scanning the tables, the f_get_avg_cust_rating() will be called for each record encountered?
Thanks
Scott