Can I remove sorts (order by) from the SQL?

Knowledge Drop

Last tested: June 2020

This is not an option by default in the UI. There are some workarounds though:
 

Workaround 1 (Downloads): There is a checkbox to remove sorting in the download modal.

Workaround 2 (null dimension):  

This dimension will generate ORDER BY NULL which will help to optimize performance.

dimension: no_orderby {    type: number    sql: null ;;  }

Workaround 3 (API): Using either the create_query, run_inline_query or create_query_task endpoints, pass in ["__UNSORTED__"] for the `sorts` parameter.
 

This content is subject to limited support.                

Version history
Last update:
‎04-05-2021 09:04 AM
Updated by: