That just means MySQL insists that you give the inner SELECT a name, like:
SELECT MAX(counted) FROM
(
SELECT COUNT(*) AS counted
FROM table_actions
WHERE status = "good"
GROUP BY user
) AS counts;
(
SELECT COUNT(*) AS counted
FROM table_actions
WHERE status = "good"
GROUP BY user
) AS counts;
0 Comments