1

I'm trying to find the nobel prize winners (http://data.nobelprize.org/snorql) born in the 20 th century and their field of study from dbpedia.

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>    
PREFIX nobel: <http://data.nobelprize.org/terms/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>




SELECT (?x as ?Label) (count(?NAME) as ?Count)
WHERE {
?Name a nobel:Laureate;
              dbpprop:dateOfBirth  ?Date;
              rdfs:label  ?NAME.
FILTER ( ?Date >= "1900-01-01"^^xsd:date ) 
FILTER (?Date < "2000-01-01"^^xsd:date) .
?Name owl:sameAs ?n
Service <http://dbpedia.org/sparql>
{?n dbo:field ?x} }

GROUP BY  ?x
ORDER BY desc(count(?Name))

The results shows me error 400 because of dbo:field. Where is the fault?

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • 1. The link doesn't work for me - at least currently not. 2. The link http://data.nobelprize.org/sparql leads to an old Fuseki version 3. Are you sure that federated queries are supported by the backend? I'm asking because the "main" page is based on a D2R server which for sure doesn't. But I don't know the backend of the `/snorql` servise – UninformedUser Dec 05 '17 at 20:19
  • This exercise is for school. So, our teacher told as that he wants the results from http://data.nobelprize.org and dbpedia. I'm trying to find the solution since friday and i can't find anything. – Λίτσα Χισιρίδου Dec 05 '17 at 20:29
  • Try `FILTER (?Date < "1961-08-04"^^xsd:date)` instead. Hint: this is Barack Obama birthday. Possible duplicate of [SPARQL queries doesn't works without LIMIT clause](https://stackoverflow.com/questions/46821096/sparql-queries-doesnt-works-without-limit-clause) – Stanislav Kralin Dec 05 '17 at 20:49
  • The problem has solution until FILTER. The problem is the dbo. I mean the data.nobelprize.org doesn't recognise it. Even though I put SERVICE It still does'n recognize it. – Λίτσα Χισιρίδου Dec 05 '17 at 21:04
  • @ΛίτσαΧισιρίδου, https://i.stack.imgur.com/qOi8C.png – Stanislav Kralin Dec 05 '17 at 21:28
  • oh thank you very much you saved me!!! I truly appreciate your help!! – Λίτσα Χισιρίδου Dec 05 '17 at 21:51

0 Answers0