N
newmaid
Unregistered / Unconfirmed
GUEST, unregistred user!
oracel 表a,b,ca表(物品基本信息表): 代码,名称,规格,单价 b表(消耗表a): 代码,日期,次数,......c表(消耗表b): 代码,日期,次数,......我写的统计语句:sql-1: select a.名称,sum(b.次数) as S1 from a, b where (a.代码=b.代码)and(日期='2009-01-01');sql-2: select a.名称,sum(c.次数) as S2 from a, c where (a.代码=c.代码)and(日期>='2000-01-01');我想用一句sql统计语句显示成如下结果,做得到吗?名称 s1 s2某 0 1某某 10 20请大家一定帮帮忙,万分感谢!!