-
-
Save hoeck/789596 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(project (table :t1) | |
[:id :title] | |
(case :alias?? | |
(<= :wage 200) | |
"low" | |
(and (> :wage 200) (< :wage 400)) | |
"average" | |
(>= :wage 400) | |
"high" | |
:else "negative")) | |
"SELECT id,title, | |
CASE WHEN (wage <= 200) THEN low | |
WHEN (wage > 200 AND wage < 400) THEN average | |
WHEN (wage >= 400) THEN high | |
ELSE | |
negative | |
END AS alias | |
FROM t1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment