-> field('v.unitid,v.nickname,v.headimgurl,sum(p.money) money')
-> join('wechat_weixin_postallog as p ON p.unitid = v.unitid','LEFT')
-> where(array('v.marketstatus' => 1,'p.type' => 5))
-> group('unitid,nickname,headimgurl')
-> order('money desc')
-> select();
查询v表里的人一共有多少消费金额,但是被where条件里的p.typ = 5给筛选掉了,怎么解决?
最佳答案