So I'm reading this answer about selecting all columns of a table where only one of them is distinct, and it's exactly what I need, but unfortunately it's a MySQL question and not a django question, and I can't find a way to translate that to django.
The answer is very simple:
SELECT col1, col2 FROM mytable GROUP BY col2
But I can't find a way to do the same using django. Anything similar that gets me multiple columns of a model with one of them distinct will suffice.
I'm using MySQL and Django 1.9.
Thank you.