Once you get comfortable with the CCP way of doing things, the SDE isn’t too bad to work with. You’ll have to dig around in it to get some of the numbers you want, and sometimes it’s the opposite way round from what you’d expect, but it’s not too bad, most of the time. Here are a few more useful snippets for getting information on things.
The meta level of items isn’t in table by itself. It’s in one of the Dogma tables. Specifically dgmTypeAttributes. This table stores a bunch of things, like slot numbers for ships, resists (actually ‘resonances, which are damage multipliers below 1) and so on. The specific one you want is attributeID 633. If you want to look at which one is which, join on dgmAttributeTypes, which contains the information for the keys. Get used to seeing the coalesce when dealing with dgmTypeAttributes, as consistancy on which one is used can be a little… lacking. If you’ve not seen it before, coalesce just returns the first non null value in the list that you give it.
So, to get the meta level for an item, it’s a simple lookup. In this case, for a ‘Modal Neutron Particle Accelerator I’ (typeid 7703, from invTypes)
select coalesce(valueInt,valueFloat) value from dgmTypeAttributes where attributeID=633 and typeID=7703;
Meta groups are the grouping of ‘Tech 1’, ‘Tech 2’, ‘Faction’, ‘Deadspace’ and so on. These are defined in invMetaGroups. The actual link to them is in invMetaTypes. This table also contains the typeid of the basic tech 1, meta 0 version of the item. It does /not/ include the tech 1 meta 0 items in the main list. So, for a Light Ion Blaster I (type id 563) the following will get you all the different versions, excluding the basic one.
select typename,metaGroupName from invMetaTypes,invTypes,invMetaGroups where invMetaTypes.parentTypeID=563 and invTypes.typeID=invMetaTypes.typeID and invMetaGroups.metaGroupID=invMetaTypes.metaGroupID;
Adding the meta level to this is fairly trivial, just joining in the dgmTypeAttributes table with the appropriate attributeID