SELECT p.id,p.name productname,po.id AS pr_opt_id,p.model_no productmdl,b.name brands,ov.name optionname, ROUND(((po.price*t.percentage/100)+po.price),2) AS actual_price, ROUND(((po.spl_price*t.percentage/100)+po.spl_price),2) AS specialprice,CONCAT('https://anonaemart.com/',im.image) as productimage, im.image as imag_prdct, cat.name AS cat_name,op.name AS opt,cat.id AS cat_idd FROM product p LEFT JOIN brand b ON b.id=p.brand_id LEFT JOIN product_option_value po ON po.product_id=p.id LEFT JOIN option_values ov ON ov.id=po.option_value_id LEFT JOIN options op ON op.id = ov.option_id LEFT JOIN product_image im ON im.product_id=p.id LEFT JOIN category cat ON cat.id=p.category_id LEFT JOIN tax t ON p.tax_id=t.id WHERE ( p.category_id = '105') AND p.status = 1 AND po.price > 0 AND p.is_reward = 0 GROUP BY p.id ORDER BY p.id desc LIMIT 0,40