sql语句::select c.email,c.mobile,c.name,count(*) as countorder from customer c where c.invitecode = (select i.invitecode from INVITECODE i left join customer_staff cs on i.staff_id=cs.sid where cs.cid=5380)
报错: ORA-00937: 不是单组分组函数
解决方法:select c.email,c.mobile,c.name,count(*) as countorder from customer c where c.invitecode = (select i.invitecode from INVITECODE i left join customer_staff cs on i.staff_id=cs.sid where cs.cid=5380)
group by c.name,c.mobile,c.email//要分组
必须有group by