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 (3521,3522,3523,3525,3526,3527,4354,4355,4358,4361,4362,4547,4548,4894,4896,4899,4900,4901,4915,4916,4917,4918,4919,4921,4923,4938,4939,4940,4941,4942,4943,4944,4945,4948,4949,4950,4951,4952,4953,4954,4963,4964,4965,4966,4967,4968,4969,4970,4971,4972,4973,4974,4975,4977,4979,4980,4981,4982,4989,4991,4992,4993,4994,4995,4996,4997,4998,4999,5010,5027,5040,5974,5980,6595,7327,7762,7763,7764,7765,7766,7767,7768,7769,7770,7771,7777,7781,7783,7784,7929,7930,7931,7932,8083,8923,9030,9031,9032,9033,9034,9035)
GROUP BY pro_id
ORDER BY pro_stato ASC, pro_ordine DESC, sku_vendita ASC, pro_nome ASC
LIMIT 72,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 = 153 AND pro_stato <= 7 AND cat_stato >= 1 AND sku_stato = 1
GROUP BY pro_id