Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Order by Clause

The optional `order by` clause enables you to sort the results in ascending or descending order.

In a continuous query, each set of ordered results in a window constitutes one batch of results. For an example, see Example Showing Batching of Return Values (Continuous Queries).

See also Limit Clause.

## Examples

Pound or hash (#) is the escape character. See Keywords and Other Reserved Words.

In the following example, each row in the result shows the ID of a customer who has placed three or more orders each of which contained 5 or more lines.

    order by A.State, C, D, E
    order by A@extId, B.name {limit : first 10}
    select o.customerId as cid
    from /Concepts/#Order o
    where o.lines@length >= 5
    group by o.customerId
    having count(*) >= 3
    order by cid desc;

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.