SWI-Prolog/ClioPatria — pull request #2 by Gniourf (2014-05-17 17:37:20+00:00)
Title: FIX: COUNT DISTINCT with no matches

Fix COUNT DISTINCT with no matches, e.g.:

SELECT (COUNT (DISTINCT ?s) AS ?n) { ?s }