Skip to content

Instantly share code, notes, and snippets.

@rcreasey
Created February 10, 2015 16:56
Show Gist options
  • Select an option

  • Save rcreasey/ad0c987ec08751f5429b to your computer and use it in GitHub Desktop.

Select an option

Save rcreasey/ad0c987ec08751f5429b to your computer and use it in GitHub Desktop.
SELECT
t.typeName,
g.groupName,
t.published,
mg.metaGroupName metaGroupName
FROM
invTypes AS t INNER JOIN
invGroups AS g ON t.groupID = g.groupID LEFT OUTER JOIN
invMetaTypes AS mt ON t.typeID = mt.typeID LEFT OUTER JOIN
invMetaGroups AS mg ON mt.metaGroupID = mg.metaGroupID LEFT OUTER JOIN
WHERE
g.categoryID = 6 AND t.published = 1
ORDER BY
t.typeName ASC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment