我正在學習如何創建SPARQL查詢。目前,我正在使用Dbpedia數據集。我的SPARQL查詢有什麼問題,我該如何解決?
我想查詢有關「什麼是在加拿大的機場」用下面的查詢:
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX : <http://dbpedia.org/resource/>
PREFIX dbpedia2: <http://dbpedia.org/property/>
PREFIX dbpedia: <http://dbpedia.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?name ?country WHERE {
?name rdf:type <http://dbpedia.org/ontology/Airport>;
?name rdf:type <http://dbpedia.org/ontology/Country>
}
LIMIT 20
我仍然感到困惑的建設SPARQL查詢尤其是資源和RDF圖。
我需要什麼是上述查詢的錯誤?
感謝