These forums have been archived and are now read-only.
The new forums are live and can be found at https://forums.eveonline.com/
Is there a better way to write this query?
SELECT Names.[typeID] AS ID, Names.[typeName] AS Name, COALESCE( HP.[valueFloat], HP.[valueInt] ) AS Structure, COALESCE( ArmorHP.[valueFloat], ArmorHP.[valueInt] ) AS Armor, COALESCE( ShieldHP.[valueFloat], ShieldHP.[valueInt] ) AS Sheild, COALESCE( PWG.[valueFloat], PWG.[valueInt] ) AS PowerGrid, COALESCE( Tf.[valueFloat], Tf.[valueInt] ) AS CPUFROM invTypes AS NamesINNER JOIN dgmTypeAttributes As HP ON Names.[typeID] = HP.[typeID] AND HP.[attributeID] = 9 INNER JOIN dgmTypeAttributes AS ArmorHP ON Names.[typeID] = ArmorHP.[typeID] AND ArmorHP.[attributeID] = 265 INNER JOIN dgmTypeAttributes AS ShieldHP ON ShieldHP.[typeID] = Names.[typeID] AND ShieldHP.[attributeID] = 263 INNER JOIN dgmTypeAttributes AS PWG ON Names.[typeID] = PWG.[typeID] AND PWG.[attributeID] = 11 INNER JOIN dgmTypeAttributes AS Tf ON Names.[typeID] = Tf.[typeID] AND Tf.[attributeID] = 48WHERE Names.[groupID] = 365 AND Names.[published] = 1 AND Names.[typeID] != 4361;