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 (228,230,233,234,236,237,239,240,241,247,249,250,251,252,253,254,256,260,262,264,267,270,277,278,279,289,290,291,292,293,294,295,4252,4253,4258,4260,4261,4265,4268,4533,5164,5168,5169,5440,5747,5748,5749,5876,6164,6165,6166,6167,7365,7482,7552,7553,7554,7555,7556,7861,8118,8246,8247,8248,8327,8328,8329,8330,8331,8332,8333)
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 = 28 AND pro_stato <= 7 AND cat_stato >= 1 AND sku_stato = 1
GROUP BY pro_id