萍
萍儿
Unregistered / Unconfirmed
GUEST, unregistred user!
我分别查出了两个语句
统计销售收入
with
temp1 as (select wlmc A.xssr bywc from biao A),
temp2 as (select wlmc b.xssr bnwc from biao B)
select '销售收入' xm,sum(bywc) bywc,sum(bnwc) bnwc
from temp1 a left jion temp2 b on a.wlmc=b.wlmc
和统计销售额
with
temp1 as (select wlmc A.xse bywc from biao A),
temp2 as (select wlmc b.xse bnwc from biao B)
select '销售额 xm,sum(bywc) bywc,sum(bnwc) bnwc
from temp1 a left jion temp2 b on a.wlmc=b.wlmc
我想把以上的两个统计结果显示到一个表中,结果如下:
xm bywc bnwc
销售收入
销售额
请问怎么写??
统计销售收入
with
temp1 as (select wlmc A.xssr bywc from biao A),
temp2 as (select wlmc b.xssr bnwc from biao B)
select '销售收入' xm,sum(bywc) bywc,sum(bnwc) bnwc
from temp1 a left jion temp2 b on a.wlmc=b.wlmc
和统计销售额
with
temp1 as (select wlmc A.xse bywc from biao A),
temp2 as (select wlmc b.xse bnwc from biao B)
select '销售额 xm,sum(bywc) bywc,sum(bnwc) bnwc
from temp1 a left jion temp2 b on a.wlmc=b.wlmc
我想把以上的两个统计结果显示到一个表中,结果如下:
xm bywc bnwc
销售收入
销售额
请问怎么写??