We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please see the example in https://www.w3.org/TR/sparql11-query/#subqueries.
The result of the script below should resemble
y minName :bob "B. Bar" :carol "C. Baz"
But we get null instead of minName values
minName
[ (rdflib.term.URIRef('http://people.example/bob'), None), (rdflib.term.URIRef('http://people.example/carol'), None) ]
The script
import rdflib import io data = """ @prefix : <http://people.example/> . :alice :name "Alice", "Alice Foo", "A. Foo" . :alice :knows :bob, :carol . :bob :name "Bob", "Bob Bar", "B. Bar" . :carol :name "Carol", "Carol Baz", "C. Baz" . """ graph = rdflib.Graph() f = io.StringIO(data) graph.parse(f, format='n3') result = graph.query(""" PREFIX : <http://people.example/> PREFIX : <http://people.example/> SELECT ?y ?minName WHERE { :alice :knows ?y . { SELECT ?y (MIN(?name) AS ?minName) WHERE { ?y :name ?name . } GROUP BY ?y } } """) print(list(result))
The text was updated successfully, but these errors were encountered:
related #607?
Sorry, something went wrong.
made min/max aggregate functions support all literals
ab422a5
not just numerics as before. fixes #628
made min/max aggregate functions support all literals (#694)
14243b6
Successfully merging a pull request may close this issue.
Please see the example in https://www.w3.org/TR/sparql11-query/#subqueries.
The result of the script below should resemble
But we get null instead of
minName
valuesThe script
The text was updated successfully, but these errors were encountered: