使用 group by 'id''
如:SELECT e.* FROM excel e INNER JOIN task t ON t.eid=e.id where e.id>0 and t.shop_name='2' GROUP BY e.id";