I want to retrieve blank nodes with a SPARQL query. I am using DBpedia as my dataset. For example, when I use the following query, I got a count of about 3.4 million results.
PREFIX prop:<http://dbpedia.org/property/>
select count(?x) where {
?x prop:name ?y
}
When I use the DISTINCT
solution modifier, I get approximately 2.2 million results.
PREFIX prop:<http://dbpedia.org/property/>
select count(DISTINCT ?x) where {
?x prop:name ?y
}
I have two questions:
- Are the 1.2 million records eliminated in the second query duplicates or blank nodes or something else?
- How can I retrieve blank nodes and their values from DBpedia?