Identifying and treating lipid abnormalities is crucial for preventing cardiovascular disease in diabetic patients, yet only two-thirds of patients reach recommended cholesterol levels. Elucidating the factors associated with lipid goal attainment represents an unmet clinical need. To address this knowledge gap, we conducted a real-world analysis of the lipid profiles of 11.252 patients from the Annals of the Italian Association of Medical Diabetologists (AMD) database from 2005 to 2019. We used a Logic Learning Machine (LLM) to extract and classify the most relevant variables predicting the achievement of a low-density lipoprotein cholesterol (LDL-C) value lower than 100 mg/dL (2.60 mmol/L) within two years of the start of lipid-lowering therapy. Our analysis showed that 61.4% of the patients achieved the treatment goal. The LLM model demonstrated good predictive performance, with a precision of 0.78, accuracy of 0.69, recall of 0.70, F1 Score of 0.74, and ROC-AUC of 0.79. The most significant predictors of achieving the treatment goal were LDL-C values at the start of lipid-lowering therapy and their reduction after six months. Other predictors of a greater likelihood of reaching the target included high-density lipoprotein cholesterol, albuminuria, and body mass index at baseline, as well as younger age, male sex, more follow-up visits, no therapy discontinuation, higher Q-score, lower blood glucose and HbA1c levels, and the use of anti-hypertensive medication. At baseline, for each LDL-C range analysed, the LLM model also provided the minimum reduction that needs to be achieved by the next six-month visit to increase the likelihood of reaching the therapeutic goal within two years. These findings could serve as a useful tool to inform therapeutic decisions and to encourage further in-depth analysis and testing.