SQL:Primary and Secondary Attributes per rank

From EVEDev

Jump to: navigation, search
 
SELECT
    inv.typeID AS typeID,
    inv.typeName AS typeName,
    invGroups.groupName AS groupName,
    inv.published AS published,
    inv.description AS description,
    rattr.valueFloat AS rank,
    GROUP_CONCAT(skills.attributeName ORDER BY dgmTypeAttributes.valueInt SEPARATOR ',') AS prisec
FROM invTypes inv
INNER JOIN invGroups ON (inv.groupID = invGroups.groupID)
INNER JOIN dgmTypeAttributes ON (inv.typeID = dgmTypeAttributes.typeID)
INNER JOIN dgmAttributeTypes sattr ON (dgmTypeAttributes.attributeID = sattr.attributeID)
INNER JOIN dgmAttributeTypes skills ON skills.attributeID = dgmTypeAttributes.valueInt
INNER JOIN dgmTypeAttributes rattr ON (inv.typeID = rattr.typeID)
WHERE invGroups.categoryID = 16
    AND (sattr.attributeName = 'primaryAttribute' OR sattr.attributeName = 'secondaryAttribute')
    AND rattr.attributeID = 275
    AND inv.published = 1
GROUP BY inv.typeID
ORDER BY invGroups.groupName, inv.typeName
 

Error while connecting to host "" !
Personal tools