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 (1255,1256,1257,1258,1259,1268,1269,1270,1271,1272,1274,1275,1276,1278,1281,1283,1284,1285,1290,1291,1292,1293,1295,1312,1313,1314,1319,1325,1326,1328,1330,1334,1335,1336,1337,1340,1341,1342,1343,1344,1345,1349,1350,1351,1353,1355,1357,1362,1363,1364,1366,1368,1370,1374,1375,1377,1381,9077,9078,3863,3864,3865,3866,3869,4085,4125,4126,4127,4128,4130,4132,4133,4138,4140,4141,4142,4145,4147,4148,4150,4155,4156,4159,4160,4161,4162,4167,4177,4178,4183,4186,4188,4193,4377,4384,4416,6145,6146,6147,6148,6276,6277,6284,6285,6286,6288,6291,6292,6293,6294,6295,6296,6298,6299,6300,6304,6305,6306,6307,6337,6338,6339,6391,6713,6716,6737,6749,6792,6793,6828,6829,6830,6832,6833,6834,6836,6838,6839,6840,6841,6844,6845,7366,7367,7368,7720,7721,7497,7506,7507,7700,7809,7810,7811,7813,7974,7975,7976,7977,7978,7979,7980,7981,7982,7983,8673)
GROUP BY pro_id
ORDER BY pro_nome ASC, pro_stato ASC, pro_ordine DESC, sku_vendita DESC
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 = 59 AND pro_stato <= 7 AND cat_stato >= 1 AND sku_stato = 1
GROUP BY pro_id