SELECT pro_id, pro_nome, pro_ordine, pro_stato, MIN(sku_vendita) AS min, MAX(sku_vendita) as MAX, (sku_listino - sku_vendita) AS diff , url_seo
FROM catalogo_prodotti
LEFT JOIN catalogo_sku ON pro_id = sku_prodotto
LEFT JOIN catalogo_categorie ON pro_categoria = cat_id
LEFT JOIN pagine_url ON pro_id = url_rif
WHERE pro_id IN (650,651,658,667,7597,7649,7648,5721,5179,5180,5181,5182,5183,5184,5185,5186,5187,5188,5189,5190,5191,5192,5722,5723,5724,5725,5726,5758,5759,5760,6037,6392,6393,6394,7183,7200,7201,7375,7514,7598,7595,7599,7600,7601,7602,7603,7718,7747,7824,7825,7847,7907,7908,7909,8067,8068,8069,8070,8071,8072,8073,8074,8075,8076,8077,8078,8095,8096,8097,8103,8570,8571,8572,8573,8575,8580,8582,8585,8586,8587,8588,8714,9016)
GROUP BY pro_id
ORDER BY pro_stato ASC, pro_ordine DESC, pro_nome ASC
LIMIT 0,24
SELECT pro_id AS proid
FROM catalogo_prodotti
LEFT JOIN catalogo_sku ON pro_id = sku_prodotto
LEFT JOIN catalogo_categorie ON pro_categoria = cat_id
LEFT JOIN pagine_url ON pro_id = url_rif
WHERE cat_id = 43 AND pro_stato <= 7 AND cat_stato >= 1 AND sku_stato = 1
GROUP BY pro_id