I am getting 500 for following query
SELECT count(*), count(DISTINCT(member)) FROM datasetName
If i run each count in separate query it works fine
Which Couchbase Server version are you using?
If 6.0 then try the following workaround:
SELECT t1.c1, t2.c2
FROM
(SELECT count(*) c1 FROM test) t1,
(SELECT count(DISTINCT(member)) c2 FROM test) t2
If 6.5 then your query should work as is.