select a.*,
(select sum(c.aae019)
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083) aae019
from ad21 a
where 1 = 1
and a.aae002 = 201003
and a.aab033 = 3
and a.aaa027 = '340122'
order by decode(a.aae221, null, '1', '0') desc, a.aaz288 desc我的理解是:等查询出满足的条件的数据后,根据 a.aaz288 的值,再检索下面的语句,不知道可正确?
select sum(c.aae019)
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083
这段话什么时候执行?
(select sum(c.aae019)
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083) aae019
from ad21 a
where 1 = 1
and a.aae002 = 201003
and a.aab033 = 3
and a.aaa027 = '340122'
order by decode(a.aae221, null, '1', '0') desc, a.aaz288 desc我的理解是:等查询出满足的条件的数据后,根据 a.aaz288 的值,再检索下面的语句,不知道可正确?
select sum(c.aae019)
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083
这段话什么时候执行?
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083 这是在选择列时执行的也是标量子查询
我再想想
from ae25 b, ae23 c
where a.aaz288 = b.aaz288
and b.aaz083 = c.aaz083后select a.*,aae019
然后where
最后排序