Lets say I have a predicate like 'age' where the values of all age triples are integer literals. What SPARQL query would return the subject with the highest age in the data?
相关问题
- NOT DISTINCT query in mySQL
- Creating a SPARQL parameterized query using append
- Flush single app django 1.9
- keeping one connection to DB or opening closing pe
- Mysql-installer showing error : Memoy could not be
相关文章
- RDF libraries for Scala [closed]
- Connection pooling vs persist connection mysqli
- Speed up sqlFetch()
- How Do I Seed My Database in the setupBeforeClass
- I set a MySQL column to “NOT NULL” but still I can
- Where in Django can I run startup code that requir
- Google OAuth 2.0 User id datatype for MYSQL
- Restore deleted records in PostgreSQL
In addition to Manuel's queries you may need to use
xsd:integer
to force values to be cast to integer if your data has some invalid/dodgy values:Depending on your data you may need to add this into his second SPARQL 1.1 query as well.
You just need to do
order by desc
with the age predicate and thenlimit
to just get the first one.See the semantics of
order by
in SPARQL hereWith the next version of SPARQL , 1.1, that is already supported in some systems you can use function aggregates and do ..
This is not supported in all triple stores currently.