Quote:
Originally Posted by Cilraaz
[You must be logged in to view images. Log in or Register.]
Yeah, I missed the count and the group by. Trying to get a quick post in during work and guess I went too quick.
|
Still fails because you have terms in your select that aren't in your group by, but I know what you mean. This is probably what you meant:
SELECT class, count(distinct id) FROM character_ WHERE timelaston > (UNIX_TIMESTAMP() - 604800) AND level = '50' GROUP BY class;
Fortunately I'm doing SQL migrations this week so looking up syntax looks an awful lot like work!