View Single Post
  #14  
Old 03-30-2010, 04:35 PM
Ferok Ferok is offline
Fire Giant


Join Date: Mar 2010
Location: Long Island, NY
Posts: 521
Send a message via AIM to Ferok
Default

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!
__________________
Kruall - Troll Shaman
Ferok - Dwarf Warrior
Last edited by Ferok; 03-30-2010 at 04:38 PM..