mit-dig / punya

Punya Framework powered by MIT App Inventor Technology

Home Page:http://punya.mit.edu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add "HAVING" to SPARQL Component

oshanis opened this issue · comments

Add "HAVING" to SPARQL Component

We require the "HAVING" clause in SPARQL to implement the following query on the following endpoint [https://punya-sparql.csail.mit.edu/foodkg/namespace/kb/sparql]

``prefix sio: http://semanticscience.org/resource/
prefix dbr: http://dbpedia.org/resource/

SELECT ?s (COUNT(?ing) as ?count) WHERE {
?s http://idea.rpi.edu/heals/kb/tagged http://idea.rpi.edu/heals/kb/tag/vegetarian ;
http://idea.rpi.edu/heals/kb/uses ?ing.
}
GROUP BY ?s
HAVING (?count < 5)
``