select sum(a1.`num`) from `order_orderlistrow` as a1 INNER JOIN `order_orderlist` as a2 on a1.`order_orderlist_id` = a2.`id` where a1.`goods_good_id` ='54' and a2.`state` <> '0'
sql语句 两表关联查询计算数量
猜你喜欢
转载自www.cnblogs.com/daochong/p/10281478.html
今日推荐
周排行