Hi There,
I have a following a document list and I have a following N1QL query and I need to build an equivalent Query Builder in iOS but I don’t know how to do with ORDER By with multiple conditions.
N1QL Query:
SELECT * from fruits WHERE type = ‘fruits’ ORDER By SUBSTR(createdDate,0,10) DESC, percentChange DESC
LIMIT 10 OFFSET 0
[ { "name" : "Apple", "percentChange" : 20, "type" : "fruits" "createdDate": "2019-12-04T05:44:12.127Z", }, { "name" : "Orange", "percentChange" : -20, "type" : "fruits" "createdDate": "2019-12-04T04:44:12.127Z" }, { "name" : "Apricot", "percentChange" : 10, "type" : "fruits" "createdDate": "2019-12-02T04:44:12.127Z" }, { "name" : "Avocado", "percentChange" : -0.1, "type" : "fruits" "createdDate": "2019-12-04T04:44:12.127Z" } ]