17,377
社区成员
发帖
与我相关
我的任务
分享
select TRADABLE_MKT_VAL as col1 ,NON_TRADABLE_MKT_VAL as col2
from FVIEW.AGT_NONTRADABLE_CUST_STK_H
where BUSI_DATE = cast('2012-02-01' as date)
union all
select sum(TRADABLE_MKT_VAL) ,sum(NON_TRADABLE_MKT_VAL)
from FVIEW.AGT_NONTRADABLE_CUST_STK_H
where BUSI_DATE = cast('2012-02-01' as date)
select * from
(
select a1,a2 from table1
union all
select sum(a1),sum(a2) from table1
) a,table2 b
where ...
select * from
(
select a1,a2 from table1 (单独执行出来是58条记录)
union
select sum(a1),sum(a2) from table1 (单独执行出来是1调记录)
)as aaa (整条语句执行出来超过1000条记录)
select a1, a2 from table1
union all
select sum(a1), sum(a2) from table1
select a1,a2 from table1
union all
select sum(a1),sum(a2) from table1