The following query gives an error.
SELECT job.job, ( SELECT SUM((jrt_sch.setup_ticks / 100) + ((jrt_sch.run_ticks_lbr / 100) * job.qty_released)) FROM jrt_sch WHERE jrt_sch.job = job.job ) plnlbr FROM job WHERE job.job = 'J000069762' AND job.suffix = '0'
I cannot use job.qty_released in the lateral second selection, giving the following error.
Multiple columns are specified in an aggregate expression containing an external link. If the aggregated expression contains an external link, then this external link must be the only column referenced by the expression.
source share