Hi all,
I'm having some difficulties with a query:
SELECT d.*,
(SELECT COUNT(id) FROM downloads WHERE category = d.category) AS count
FROM downloads d
GROUP BY d.category
ORDER BY count DESC
So, I'm trying to get the total downloadcount of each category but this query hangs each time I run it.
The downloads table has +- 20000 rows
What am I doing wrong?