Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BETWEEN ... AND formatting is maybe not optimal #17

Closed
max-sixty opened this issue Jan 11, 2023 · 1 comment
Closed

BETWEEN ... AND formatting is maybe not optimal #17

max-sixty opened this issue Jan 11, 2023 · 1 comment

Comments

@max-sixty
Copy link

We break before AND even following a BETWEEN, which might not be intended:

SELECT
  distance BETWEEN 0
  AND 20 AS is_proximate,
  distance BETWEEN 20
  AND 100 AS is_mid,
  distance >= 100 AS is_far
FROM
  employees

...relative to what I might have expected...

SELECT
  distance BETWEEN 0 AND 20 AS is_proximate,
  distance BETWEEN 20 AND 100 AS is_mid,
  distance >= 100 AS is_far
FROM
  employees
@max-sixty
Copy link
Author

Thanks a lot @shssoichiro !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant