Project:SPARQL/examples: Difference between revisions

Jump to navigation Jump to search
No edit summary
Line 66: Line 66:
</sparql>
</sparql>


=== Wikidata-equivalenten van properties in deze Wikibase ===
=== Overview of properties in this Wikibase, with their Labels, Descriptions and Aliases, both in NL and in EN, as well their equivalent properties in Wikidata (if applicable) ===  


<sparql tryit="1">
<sparql tryit="1">
PREFIX bd: <http://www.bigdata.com/rdf#>
# Overview of properties in this Wikibase,
# with their Labels, Descriptions and Aliases,
# both in NL and in EN,
# as well their equivalent properties in Wikidata (if applicable)
 
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX wdt: <https://kbtestwikibase.wikibase.cloud/prop/direct/>
PREFIX p: <https://kbtestwikibase.wikibase.cloud/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>


SELECT ?p ?pLabel ?pDescription ?pAltLabel ?w WHERE {
SELECT ?p ?pType
   ?p rdf:type wikibase:Property.
?pLabelNL ?pLabelEN
   OPTIONAL{?p wdt:P1 ?w.}  
?pDescriptionNL ?pDescriptionEN
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
(GROUP_CONCAT(DISTINCT ?pAliasNL ; separator = " | ") as ?pAliasesNL )
(GROUP_CONCAT(DISTINCT ?pAliasEN ; separator = " | ") as ?pAliasesEN )
?wikidataEquivalentProperty
 
WHERE {
 
   ?p wikibase:propertyType ?pType .
   OPTIONAL{?p wdt:P1 ?wikidataEquivalentProperty.}  
 
   OPTIONAL{?p rdfs:label ?pLabelNL FILTER(LANG(?pLabelNL)='nl').}
  OPTIONAL{?p rdfs:label ?pLabelEN FILTER(LANG(?pLabelEN)='en').}
 
  OPTIONAL{?p schema:description ?pDescriptionNL FILTER(LANG(?pDescriptionNL) = "nl"). } 
  OPTIONAL{?p schema:description ?pDescriptionEN FILTER(LANG(?pDescriptionEN) = "en"). }
 
  OPTIONAL{?p skos:altLabel ?pAliasNL FILTER(LANG(?pAliasNL) = "nl"). } 
  OPTIONAL{?p skos:altLabel ?pAliasEN FILTER(LANG(?pAliasEN) = "en"). }    
   
}
}
GROUP BY ?p ?pType ?pLabelNL ?pLabelEN ?pDescriptionNL ?pDescriptionEN ?wikidataEquivalentProperty
ORDER BY ASC(xsd:integer(STRAFTER(STR(?p), 'P')))
ORDER BY ASC(xsd:integer(STRAFTER(STR(?p), 'P')))
</sparql>
</sparql>
emailconfirmed
952

edits

Navigation menu