1,477,004
edits
Line 82: | Line 82: | ||
?isSubsidiaryOf ?isSubsidiaryOfLabel | ?isSubsidiaryOf ?isSubsidiaryOfLabel | ||
WHERE { | WHERE { | ||
?org_types wdt:P2 wd:Q50862 . # | ?org_types wdt:P2 wd:Q50862 . # subclasses of USGS organization | ||
?item wdt:P1 ?org_types . # | ?item wdt:P1 ?org_types . # items in those classes | ||
OPTIONAL { | OPTIONAL { | ||
?item wdt:P189 ?hasSubsidiary . # | ?item wdt:P189 ?hasSubsidiary . # has subsidiary relationships | ||
} | } | ||
OPTIONAL { | OPTIONAL { | ||
?item wdt:P190 ?isSubsidiaryOf . # | ?item wdt:P190 ?isSubsidiaryOf . # is subsidiary of relationships | ||
} | } | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } | SERVICE wikibase:label { bd:serviceParam wikibase:language "en" . } | ||
} | } | ||
</sparql> | </sparql> |