帮我看看这个查询,总报错!!!
SQL> (select pp from (select id as pp from test1 union all select p1 as pp from test1) order by pp d
esc)
2 minus
3 (select max(pp) as pp from (select id as pp from test1 union all select p1 as pp from test1));
(select pp from (select id as pp from test1 union all select p1 as pp from test1) order by pp desc)
*
ERROR at line 1:
ORA-00907: missing right parenthesis
我的本意是求id和p1的第二大值。