Template:Openei query 1

From solab
Jump to navigation Jump to search
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX swivt: <http://semantic-mediawiki.org/swivt/1.0#>
PREFIX resource: <http://openei.org/resources/>
PREFIX category: <http://openei.org/resources/Category-3A>
PREFIX property: <http://openei.org/resources/Property-3A>
SELECT ?page ?name ?address ?place_name ?zip ?coordinates ?sector_name ?category_name
WHERE {
 ?organization swivt:page ?page.
 ?organization rdf:type category:Companies.
 ?organization rdfs:label ?name.
 OPTIONAL { ?organization property:Address ?address. }.
 OPTIONAL { ?organization property:Zip ?zip. }.
 OPTIONAL { ?organization property:Coordinates ?coordinates. }.
 OPTIONAL {
   ?organization property:Place ?place.
   ?place rdfs:label ?place_name.
 }.
 OPTIONAL {
   ?organization property:Sector ?sector. 
   ?sector rdfs:label ?sector_name.
 }.
 OPTIONAL {
   ?organization rdf:type ?category.
   ?category rdfs:label ?category_name.
 }.
}

{{{limit}}}