SELECT DISTINCT t1.id AS id, t1.price, t1.group_id, t1.is_active, t1.name, t1.description, t2.parent_id, t2.name AS group_name, t3.file
FROM `product` t1
INNER JOIN `product_group` t2 ON ( t1.group_id = t2.id )
INNER JOIN `product_image` t3 ON ( t1.id = t3.product_id )
WHERE t1.is_active =1 AND t1.group_id =72
ORDER BY t3.product_id ASC
LIMIT 0 , 5000