[Guide] Simple Query to Count Total Monster Spawns by Their Levels

06/21/2015 22:49 witchymoo#1
hey ;)

Here I'll share simple query about how to count total monster spawn categorized by their level, this should match total monster spawn you get when using gm command /worldstatus

This prolly useless to you but if you find it useful, feel free to develop it to match your needs ;)

Now the boring part:
Code:
/*
 * Count total monster spawn categorized by level
 * Witchy Moo, 20150622
 */
SELECT d.CodeName128 AS 'Monster Code', e.Lvl AS 'Level', SUM(a.dwMaxTotalCount) AS 'Max Spawn'
	FROM Tab_RefNest a 
	INNER JOIN Tab_RefTactics b ON a.dwTacticsID = b.dwTacticsID
	JOIN Tab_RefHive c ON a.dwHiveID = c.dwHiveID
	JOIN _RefObjCommon d ON b.dwObjID = d.ID
	JOIN _RefObjChar e ON d.Link = e.ID
	JOIN _RefRegion f ON a.nRegionDBID = f.wRegionID
	WHERE d.Rarity IN (0,6)	-- Only select Regular and Elite, add 3,8 for uniques
	AND f.ContinentName NOT LIKE 'GOD_TOGUI'	-- Not including FGW monsters
	AND (d.[Service] = 1 AND d.Codename128 LIKE 'MOB_%' AND d.Codename128 NOT LIKE 'MOB_GOD_%')	-- Not including FGW monsters
	GROUP BY d.CodeName128, e.Lvl, d.Rarity ORDER BY e.Lvl ASC
06/24/2015 13:54 tschulian#2
Usefull tho.
Thanks!
06/26/2015 08:29 Justin1337*#3
Thanks witchymoo. ;)
06/27/2015 07:41 Laag#82#4
Good
07/15/2015 07:44 ersers2#5
Actually matches worldstatus command, so neat to have an accurate documentation for this.
07/18/2015 11:16 B1Q B0SS#6
useful as usual