Ver originalSELECT distinct S.* FROM SUBCATEGORIAS S LEFT JOIN productos P ON S.idsub = P.idsub;
Ver originalSELECT DISTINCT S.* FROM SUBCATEGORIAS SWHERE idsub IN (SELECT idsub FROM productos);