How to get total number of results when using LIMIT in SPARQL?

天大地大妈咪最大 提交于 2020-01-16 09:04:44

问题


I have a SPARQL query which returns result with a LIMIT of 20.. In this query I also want to know the total number of results without running the query two times (one with LIMIT and one without LIMIT)..

For Example-- On running a query total possible results are 500 with LIMIT it displays only 20 at a time, but in my response I want a field which displays total result count, i.e., 500 ...

Updated question

Suppose

Now if i do a query where sequence = abc_11 with LIMIT=2 I will get something like

which is fine, with addition to this output what i want is

where totalMatchedResult is 5 because query actually matched 5 results but returned only 2 because of our LIMIT=2

来源:https://stackoverflow.com/questions/58724186/how-to-get-total-number-of-results-when-using-limit-in-sparql

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!