Project:SPARQL/examples: Difference between revisions

Line 1,076: Line 1,076:
# OPTIONAL { ?property skos:altLabel ?propertyAltLabel . } # not many of these
# OPTIONAL { ?property skos:altLabel ?propertyAltLabel . } # not many of these


   OPTIONAL { ?property schema:description ?propertyDescription .
   OPTIONAL {  
        #filter(lang(?propertyDescription)='en' ) . # misses 2 that have en-gb only
         SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".
         SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".
           ?property schema:description ?propertyDescription .
           ?property schema:description ?propertyDescription .
Line 1,083: Line 1,082:
   }  
   }  
    
    
   #FILTER(LANG(?propertyLabel) = 'en') # fix label language dups  
   FILTER(LANG(?propertyLabel) = 'en') # fix label language dups . but why doesn't SERVICE work?
 


    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".
          ?property rdfs:label        ?propertyLabel.
        }


}
}
579

edits