ZOHO COQL: Order By Picklist type field

ZOHO COQL: Order By Picklist type field

Hello. I am extremely confused about the "ORDER BY" implementation in the Zoho COQL.
Can you please help me to sort the results?

I am using Zoho REST API: https://www.zohoapis.com/crm/v2/coql
Here is my query:
  1. {
  2.     "select_query": "select Amount,Stage,Type FROM Deals WHERE Owner is null OR Owner is not null  ORDER BY Amount ASC"
  3. }
And the result is:

  1. {
        "data": [
            {
                "Type": "Existing Business",
                "Amount": 25000,
                "Stage": "Proposal/Price Quote",
                "id": "4197230000000241287"
            },
            {
                "Type": "Existing Business",
                "Amount": 35000,
                "Stage": "Closed Won",
                "id": "4197230000000241289"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241286"
            },
            {
                "Type": "Existing Business",
                "Amount": 45000,
                "Stage": "Closed Lost",
                "id": "4197230000000241290"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241291"
            },
            {
                "Type": "New Business",
                "Amount": 55000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241284"
            },
            {
                "Type": "New Business",
                "Amount": 60000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241292"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Value Proposition",
                "id": "4197230000000241285"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Negotiation/Review",
                "id": "4197230000000241288"
            },
            {
                "Type": "Existing Business",
                "Amount": 250000,
                "Stage": "Qualification",
                "id": "4197230000000241283"
            }
        ],
        "info": {
            "count": 10,
            "more_records": false
        }
    }
So far, so good.
Now, let's change the "ORDER BY" statement to order by Stage:
  1. { "select_query": "select Amount,Stage,Type FROM Deals
  2. WHERE Owner is null OR Owner is not null ORDER BY Stage ASC" }
And the result ordered in the wrong order - descending instead of ascending:
  1. {
        "data": [
            {
                "Type": "Existing Business",
                "Amount": 250000,
                "Stage": "Qualification",
                "id": "4197230000000241283"
            },
            {
                "Type": "New Business",
                "Amount": 55000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241284"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241291"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Value Proposition",
                "id": "4197230000000241285"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241286"
            },
            {
                "Type": "New Business",
                "Amount": 60000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241292"
            },
            {
                "Type": "Existing Business",
                "Amount": 25000,
                "Stage": "Proposal/Price Quote",
                "id": "4197230000000241287"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Negotiation/Review",
                "id": "4197230000000241288"
            },
            {
                "Type": "Existing Business",
                "Amount": 35000,
                "Stage": "Closed Won",
                "id": "4197230000000241289"
            },
            {
                "Type": "Existing Business",
                "Amount": 45000,
                "Stage": "Closed Lost",
                "id": "4197230000000241290"
            }
        ],
        "info": {
            "count": 10,
            "more_records": false
        }
    }
Now, let's order by Type:

  1. {
  2.     "select_query": "select Amount,Stage,Type FROM Deals WHERE Owner is null OR Owner is not null  ORDER BY Type ASC"
  3. }
And the result is not ordered at all:
  1. {
        "data": [
            {
                "Type": "Existing Business",
                "Amount": 250000,
                "Stage": "Qualification",
                "id": "4197230000000241283"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Value Proposition",
                "id": "4197230000000241285"
            },
            {
                "Type": "Existing Business",
                "Amount": 25000,
                "Stage": "Proposal/Price Quote",
                "id": "4197230000000241287"
            },
            {
                "Type": "Existing Business",
                "Amount": 70000,
                "Stage": "Negotiation/Review",
                "id": "4197230000000241288"
            },
            {
                "Type": "Existing Business",
                "Amount": 35000,
                "Stage": "Closed Won",
                "id": "4197230000000241289"
            },
            {
                "Type": "Existing Business",
                "Amount": 45000,
                "Stage": "Closed Lost",
                "id": "4197230000000241290"
            },
            {
                "Type": "New Business",
                "Amount": 55000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241284"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241286"
            },
            {
                "Type": "New Business",
                "Amount": 45000,
                "Stage": "Needs Analysis",
                "id": "4197230000000241291"
            },
            {
                "Type": "New Business",
                "Amount": 60000,
                "Stage": "Identify Decision Makers",
                "id": "4197230000000241292"
            }
        ],
        "info": {
            "count": 10,
            "more_records": false
        }
    }

Can somebody clarify, if I can use ORDER BY for the picklist type or not?