Hi Adam,
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX event: <http://purl.org/NET/c4dm/event.owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?creatorName ?creatorCountry
WHERE
{
?creatorName ?predicate ?creatorCountry .
?locationName rdfs:label ?creatorCountry .
?locationInfo event:place ?locationName .
?publication bibo:presentedAt ?locationInfo .
?publication bibo:presentedAt ?place . ##1
} LIMIT 500
and the last part (##1) does not add anything but may cause duplication
of results.
The output order of rows is not fixed.
What output are trying to get back?
On 18/03/2020 21:10, Adam Davies wrote:
Dear all,
I have been attempting to use jena fuseki to perform a query on a large
dataset. However, due to the nature of this dataset, and my current
inexperience with jena fuseki - being a new user for a project in education -
after some research into jena fuseki I found myself coming to the conclusion
that I would need to nest my select queries to order my data in a
human-readable fashion that I could work through efficiently. When I came to
write these nested queries though, I was immediately given an error after the
first nest.
Due to my lack of experience, I have struggled to find a solution to this
problem, and came here for advice. Is anyone able to help me? I have attached
aforementioned code below:
SELECT ?creatorName ?creatorCountry
WHERE
{#BEGINMAINSELECT
?creatorName ?predicate ?creatorCountry
{#BEGINNEST1
SELECT ?creatorCountry
WHERE
{
?locationName <http://www.w3.org/2000/01/rdf-schema#label>
?creatorCountry#Find out the human-readable name of the location the publication was
presented at via it's reference
}
{#BEGINNEST2
There's a syntax error at line #BEGINNEST2
Was this meant? It removes the "}" on the line before #BEGINNEST2
SELECT ?a ?b ?c {
?a :p [] .
{ SELECT ?b { ?b :q ?x
{ SELECT ?d { ?d :q ?y
{ SELECT ?c { ?c :q ?z
}}
}}
}}
}
SELECT ?locationName
WHERE
{
?locationInfo
<http://purl.org/NET/c4dm/event.owl#place> ?locationName#Find out the name
reference of the location the publication was presented at
}
{#BEGINNEST3
SELECT ?locationInfo
WHERE
{
?publication
<http://purl.org/ontology/bibo/presentedAt> ?locationInfo#Select each
publication retrieved from the below query and find out where they were presented at
}
{#BEGINNEST4
SELECT ?publication
WHERE
{
?publication
<http://purl.org/ontology/bibo/presentedAt> ?place#Select all publications with
predicate 'presented at'
}
}#ENDNEST4
}#ENDNEST3
}#ENDNEST2
}#ENDNEST1
}
LIMIT 500