以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- sql语句请教 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=127274) |
-- 作者:hbhb -- 发布时间:2018/11/9 18:44:00 -- sql语句请教 SEL—ECT 订购日期, {订单明细}.*, 产品名称 FROM ({订单明细},sum(数量) group by 产品名称 INNER JOIN {产品} ON {订单明细}.产品ID = {产品}.产品ID) INNER JOIN {订单} ON {订单明细}.订单ID = {订单}.订单ID ORDER BY 订购日期 大师:内连接如何使用分组统计并连接?
|
-- 作者:有点蓝 -- 发布时间:2018/11/9 20:20:00 -- 要对哪个表进行分组统计? 类似 select * from (select 产品ID,sum(数量) as 数量 from {表A} group by 产品ID) as a inner join {表B} on {表A}.产品ID = {表B}.产品ID |