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 (7341,1665,1666,1685,1686,1691,3543,3547,3548,3553,4223,4232,4233,4236,4237,4238,4239,4240,7340,5389,5714,5949,5950,6348,6389,7337,7610,7611,7612,7613,7614,8023)
GROUP BY pro_id
ORDER BY sku_vendita ASC, pro_stato ASC, pro_ordine DESC, pro_nome ASC
LIMIT 144,48
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 = 86 AND pro_stato <= 7 AND cat_stato >= 1 AND sku_stato = 1
GROUP BY pro_id