Anonymous

Item talk:Q50862: Difference between revisions

From geokb
 
Line 82: Line 82:
?isSubsidiaryOf ?isSubsidiaryOfLabel
?isSubsidiaryOf ?isSubsidiaryOfLabel
WHERE {
WHERE {
   ?org_types wdt:P2 wd:Q50862 . # Gets subclasses of USGS organization
   ?org_types wdt:P2 wd:Q50862 . # subclasses of USGS organization
   ?item wdt:P1 ?org_types . # Gets items in those classes
   ?item wdt:P1 ?org_types . # items in those classes
   OPTIONAL {
   OPTIONAL {
     ?item wdt:P189 ?hasSubsidiary . # get has subsidiary relationships
     ?item wdt:P189 ?hasSubsidiary . # has subsidiary relationships
   }
   }
   OPTIONAL {
   OPTIONAL {
     ?item wdt:P190 ?isSubsidiaryOf . # get is subsidiary of relationships
     ?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>