Skip to content

Instantly share code, notes, and snippets.

View flexd's full-sized avatar

Kristoffer Berdal flexd

View GitHub Profile
SELECT it2."typeName", it2."typeID",
coalesce(dta2."valueInt",dta2."valueFloat") multiplier,
coalesce(dta3."valueInt",dta3."valueFloat") me,
coalesce(dta4."valueInt",dta4."valueFloat") te,
coalesce(dta5."valueInt",dta5."valueFloat") runs
FROM "invTypes"
JOIN "industryActivityMaterials" iam ON (iam."materialTypeID"="invTypes"."typeID" and iam."activityID"=8 and "groupID"=716)
JOIN "industryActivityProducts" iap ON (iam."typeID"=iap."typeID")
JOIN "dgmTypeAttributes" dta ON (dta."typeID"="invTypes"."typeID" AND dta."attributeID"=1115)
JOIN "invTypes" it2 ON (it2."groupID"=dta."valueInt")