I have SQL query like this:

select count(id) as ct, city from table group by city order by ct desc

How can I perform this query in Couchbase? I have map function like This:

function (doc, meta) {
  if(doc.city!==null) {
  emit(doc.city,1)
    }
}

and reduce:

_count

my query url is like this: _view/q7?group_level=1&descending=true but it it 
sort only for key not for value.

No one had answer this here

http://stackoverflow.com/questions/23410708/how-to-do-order-in-groupingaggregation-in-couchbase

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to