launch a mysql console (like you would do if you wanted to source a db.sql)
then type :
select spawn2.id from spawn2,npc_types,spawnentry where npc_types.name like '%sleeper%' and spawnentry.npcID=npc_types.id and spawnentry.spawngroupID=spawn2.spawngroupID;
ps : i have no DB here, so i haven't tested it
