Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Support ordinal in GROUP/ORDER BY clause #215

Closed
dai-chen opened this issue Oct 11, 2019 · 1 comment
Closed

Support ordinal in GROUP/ORDER BY clause #215

dai-chen opened this issue Oct 11, 2019 · 1 comment
Assignees
Labels
BI integration Issues for integration with BI tools enhancement New feature or request

Comments

@dai-chen
Copy link
Member

In issue #213, it seems BI tool like Tableau will generates GROUP BY (and probably ORDER BY too) using ordinal.

Take query SELECT age FROM accounts GROUP BY 1 for example, the ordinal 1 here is referring to field age. So actually this query is Equivalent to SELECT age FROM accounts GROUP BY age. Although it's said this is not a good practice, we need to support this for integration with BI tool.

Reference:

  1. https://stackoverflow.com/questions/7392730/what-does-sql-clause-group-by-1-mean
  2. https://dba.stackexchange.com/questions/86609/why-do-we-use-group-by-1-and-group-by-1-2-3-in-sql-query
@abbashus
Copy link
Contributor

Fixed by #248.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
BI integration Issues for integration with BI tools enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants