Fatal error: Uncaught Exception: Error: Unknown column 'p2.product_id' in 'field list'
Error No: 1054
SELECT p.product_id,
COUNT(DISTINCT p2.product_id) AS group_count,
AVG(r.rating) AS rating,
MIN(pd2.price) AS discount,
MIN(ps.price) AS special
FROM oc_product p
LEFT JOIN oc_ocfilter_filter_value_to_product fv2p1 ON (p.product_id = fv2p1.product_id) LEFT JOIN oc_ocfilter_filter_value_to_product fv2p2 ON (p.product_id = fv2p2.product_id) LEFT JOIN oc_ocfilter_filter_value_to_product fv2p3 ON (p.product_id = fv2p3.product_id) LEFT JOIN oc_ocfilter_filter_value_to_product fv2p4 ON (p.product_id = fv2p4.product_id) LEFT JOIN oc_ocfilter_filter_value_to_product fv2p5 ON (p.product_id = fv2p5.product_id) LEFT JOIN oc_product_description pd ON (p.product_id = pd.product_id)
LEFT JOIN oc_product_to_store p2s ON (p.product_id = p2s.product_id)
LEFT JOIN oc_product_to_category p2c ON (p.product_id = p2c.product_id)
LEFT JOIN oc_product_filter pf ON (p.product_id = pf. in /home/soft/tep.ua/system/library/db/mysqli.php on line 40