-
-
Save flexd/535ac7c5172706c10e3c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | |
JOIN "dgmTypeAttributes" dta2 ON (dta2."typeID"=it2."typeID" AND dta2."attributeID"=1112) | |
JOIN "dgmTypeAttributes" dta3 ON (dta3."typeID"=it2."typeID" AND dta3."attributeID"=1113) | |
JOIN "dgmTypeAttributes" dta4 ON (dta4."typeID"=it2."typeID" AND dta4."attributeID"=1114) | |
JOIN "dgmTypeAttributes" dta5 ON (dta5."typeID"=it2."typeID" AND dta5."attributeID"=1124) | |
WHERE iap."productTypeID"=1320; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I postgresified it, and made it readable :-D