Hi @Lenty_Me,
You can use sorting in Analytics queries, but Analytics secondary indexes are not currently utilized for sorting operations.
For the example query you provided, all the data in the collection orders will first be sorted on the id field, then a global limit for the top 12 will be applied.