SELECT * FROM download_centre WHERE product_val & 2048 GROUP BY fund_trust_product, download_type, currency ORDER BY month, year
I am having a bit of trouble with my SQL above. What it is doing is the GROUP BY first then the ORDER BY, at least I think that is what it is doing. I have a download in January, February and March, and the February one is being displayed. Is there a way to do the ORDER BY first then grab the distinct ones.
Any ideas?
Thanks,
Chris