多 多多帮助 Unregistered / Unconfirmed GUEST, unregistred user! 2009-02-25 #1 进货表进货数量 进货金额 销售表销售数量 销售金额先求出进货表中的进货均价。然后把这个进货均价*销售表中的数量。怎么写,多谢
C caixuan2006 Unregistered / Unconfirmed GUEST, unregistred user! 2009-02-25 #2 select 销售数量,销售数量*B.pj ,销售金额 from 销售表,(select sum(进货金额)/sum(进货数量) as pj from 进货表)B
Z znxia Unregistered / Unconfirmed GUEST, unregistred user! 2009-02-25 #3 select 销售数量,销售数量*B.pj ,销售金额 from 销售表, (select 货物代码, sum(进货金额)/sum(进货数量) as pj from 进货表 group by 货物代码 ) B where 销售表.货物代码 =B.货物代码
select 销售数量,销售数量*B.pj ,销售金额 from 销售表, (select 货物代码, sum(进货金额)/sum(进货数量) as pj from 进货表 group by 货物代码 ) B where 销售表.货物代码 =B.货物代码