![]() |
|
|
|
#1
|
|||
|
No count?
__________________
Kruall - Troll Shaman
Ferok - Dwarf Warrior | ||
|
|
|||
|
#2
|
|||
|
Yeah, I missed the count and the group by. Trying to get a quick post in during work and guess I went too quick.
__________________
| ||
|
|
|||
|
#3
|
||||
|
Quote:
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..
|
|
|||
|
#4
|
|||
|
http://www.thetimekillers.com/eqemu/test.php
Works fine for me with a limited database to work with. I'll create multiple characters just to fuddle with when I get home tonight. Took another look at it. Yeah, I don't need the timelaston or level in the select. Drop those and it's a more efficient statement.
__________________
| ||
|
Last edited by Cilraaz; 03-30-2010 at 04:45 PM..
Reason: Added last few sentences.
|
|
||
|
#5
|
||||
|
Quote:
I'm a little more familiar with MS-SQL, which I'm pretty sure would throw an error there. Either way, I'm betting that data like this would be done as a nightly / hourly load to the message board db, rather than an on demand directly from the game db. It's not really very important that it's up-to-the-second information. This kind of aggregation isn't overly costly, but more costly than I'm sure it needs to be.
__________________
Kruall - Troll Shaman
Ferok - Dwarf Warrior | |||
|
|
||||
|
#6
|
|||
|
Thank Prexus I am not a math major
__________________
~Yiblaan Conjurer
53 Magician of P1999~ ~Leader of <Tears of Prexus>~ Magician of the 2 Seas of Norrath! ~Bearded~ 51 Cleric ::::RED 99:::: ~Sylvana Whisperwind~ 45 Druid ~Yiblaangel~ 33 Paladin of Prexus ![]() | ||
|
|
|||
|
#8
|
|||
|
I'd like to see if you guys can get this worked out... it would be cool to see the class distribution on the server.
__________________
![]() Tetsusaru - 20 Monk | Glaak - 10 Shaman EQLite - 1.35GB & Runs P99 on a USB Drive Original & Custom P99 Icons | ||
|
|
|||
|
#9
|
||||
|
Quote:
__________________
| |||
|
|
||||
|
#10
|
|||
|
assuming that the database is MS SQL... I don't think it is though.
but yeah, you should be able to generate a logdump of the active players and then sort them like Ferok suggested above. I for one would enjoy seeing the results of the queries, it's kind of neat to see trends | ||
|
|
|||
![]() |
|
|