Just have a quick question. Suppose in a relation we have 10 tuples and in each tuple contain a nested table. Say we wanted to get the sum of
'X value' in each tuple of the nested table as well as the sum of 'Y value' in the main relation. So would the query below work? I'm not too sure if calling the sum of X in the nested table to cause the sum of Y in the main relation to execute multiple times. That is for example 1 tuple has a nested table that has 10 tuples, so would the query cause the sum of the main tuple to multiply by 10?
select sum(a.Y), sum(n.X)
from Relation a, table(a.nested) n
group by a.someVariable