Fix NPE in case of empty result set in bi-16 sparql query
@@ -8,6 +8,10 @@ PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbpedia: <http://dbpedia.org/resource/>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
+SELECT ?personId ?tagName ?messageCount
+WHERE
+{
+ {
SELECT ?personId ?tagName (COUNT(?message) AS ?messageCount)
WHERE
{
@@ -31,7 +35,12 @@ WHERE
}
}
?message snvoc:hasTag/foaf:name ?tagName
+
}
GROUP BY ?personId ?tagName
ORDER BY DESC(?messageCount) ?tagName ?personId
+ }
+ ?personId a snvoc:Person
+}
+ORDER BY DESC(?messageCount) ?tagName ?personId
LIMIT 100
