mysql语句如下:select id, name, shop, time, count(b.gid) as num from table1 a left join table2 b on a.id = b.gid where a.shopId = #{shopId} group by id order by time desc
order by time 报错:Column time must be either aggregated,
select id, name, shop, time, count(b.gid) as num
from table1 a left join table2 b
on a.id = b.gid where a.shopId = #{shopId}
group by id, name, shop, time order by time desc