I have a MySQL table with 10 fields. For this particular query, I only care about 4: Title, Variables, Location, Date. I would like to take the distinct values of these four groups and then group by Title, Variables. However, When I use the following query
Select DISTINCT
Title,
Variables,
Location,
Date
FROM ForecastsTest2 WHERE ...
GROUP BY Variables, Title
ORDER BY Title
It groups first and then takes distinct results. Is there any way I can switch this order?