Error: MySQL server has gone away
Error No: 2006
SELECT t.name, COUNT(t.id) AS total, pt.product_id FROM product_tags pt, tags t WHERE t.id = pt.tag_id GROUP BY t.name