I can not mount a query, the logic is:
Select produtos
with categorias
different, being the products with more points, thus I will have a product of more points of category X, another of category Y.
I tried to use DISTINCT
, something like:
SELECT DISTINCT categoria FROM produtos ORDER BY pontos DESC
The problem is that the columns I need to read do not come (only comes with categoria
..).
What do I do to resolve this case?