Difference between revisions of "Useful Queries"
From DSP Wiki
(Created page with "== Find All Mobs Without Pets == <pre> select mobid, mobname, mob_pets.pet_offset from mob_spawn_points inner join mob_groups on mob_spawn_points.groupid = mob_groups.group...") |
|||
Line 8: | Line 8: | ||
left join mob_pets on mob_pets.mob_mobid = mob_spawn_points.mobid | left join mob_pets on mob_pets.mob_mobid = mob_spawn_points.mobid | ||
where mob_pools.mJob IN (9, 14, 15, 18) and mob_pets.pet_offset IS NULL; | where mob_pools.mJob IN (9, 14, 15, 18) and mob_pets.pet_offset IS NULL; | ||
+ | </pre> | ||
+ | |||
+ | == Find All Pets Without a Master == | ||
+ | |||
+ | <pre> | ||
+ | select mobid, mobname from mob_spawn_points where mobname LIKE '%\_s\_%' and NOT EXISTS (select * from mob_pets where mob_mobid + pet_offset = mobid limit 1); | ||
</pre> | </pre> |
Revision as of 03:04, 12 November 2015
Find All Mobs Without Pets
select mobid, mobname, mob_pets.pet_offset from mob_spawn_points inner join mob_groups on mob_spawn_points.groupid = mob_groups.groupid inner join mob_pools on mob_groups.poolid = mob_pools.poolid left join mob_pets on mob_pets.mob_mobid = mob_spawn_points.mobid where mob_pools.mJob IN (9, 14, 15, 18) and mob_pets.pet_offset IS NULL;
Find All Pets Without a Master
select mobid, mobname from mob_spawn_points where mobname LIKE '%\_s\_%' and NOT EXISTS (select * from mob_pets where mob_mobid + pet_offset = mobid limit 1);